Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
Internal header for String. More...
#include "ruby/internal/config.h"
#include <stddef.h>
#include "internal/compilers.h"
#include "ruby/internal/stdbool.h"
#include "ruby/encoding.h"
#include "ruby/ruby.h"
Go to the source code of this file.
Macros | |
#define | STR_NOEMBED FL_USER1 |
#define | STR_SHARED FL_USER2 /* = ELTS_SHARED */ |
#define | rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str)) |
#define | rb_fstring_literal(str) rb_fstring_lit(str) |
#define | rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc)) |
#define | rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc) |
#define | rb_fstring_cstr(str) |
Internal header for String.
Definition in file string.h.
#define rb_fstring_cstr | ( | str | ) |
#define rb_fstring_enc_lit | ( | str, | |
enc | |||
) | rb_fstring_enc_new((str), rb_strlen_lit(str), (enc)) |
#define rb_fstring_enc_literal | ( | str, | |
enc | |||
) | rb_fstring_enc_lit(str, enc) |
#define rb_fstring_lit | ( | str | ) | rb_fstring_new((str), rb_strlen_lit(str)) |
#define rb_fstring_literal | ( | str | ) | rb_fstring_lit(str) |
#define STR_SHARED FL_USER2 /* = ELTS_SHARED */ |
VALUE rb_ec_str_resurrect | ( | struct rb_execution_context_struct * | ec, |
VALUE | str | ||
) |
Definition at line 1637 of file string.c.
References RSTRING_LEN, RUBY_DTRACE_CREATE_HOOK, and str.
VALUE rb_enc_str_scrub | ( | rb_encoding * | enc, |
VALUE | str, | ||
VALUE | repl | ||
) |
Definition at line 10575 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_UNKNOWN, str, and STR_ENC_GET.
VALUE rb_external_str_with_enc | ( | VALUE | str, |
rb_encoding * | eenc | ||
) |
Definition at line 1137 of file string.c.
References ENC_CODERANGE_7BIT, rb_ascii8bit_encindex, rb_default_internal_encoding(), rb_enc_associate_index(), rb_enc_str_coderange(), rb_enc_to_index(), rb_str_conv_enc(), rb_usascii_encindex, and str.
Definition at line 352 of file string.c.
References fstr_update_arg::fstr.
Referenced by rb_parser_lex_state_name(), and rb_str_to_interned_str().
Definition at line 459 of file string.c.
References ptr, rb_fstring_new(), and strlen().
VALUE rb_fstring_enc_new | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 445 of file string.c.
Referenced by rb_fstring_cstr().
Definition at line 11055 of file string.c.
References rb_id2str, rb_str_escape(), rb_str_symname_p(), and str.
VALUE rb_setup_fake_str | ( | struct RString * | fake_str, |
const char * | name, | ||
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 434 of file string.c.
Referenced by rb_check_id_cstr(), rb_check_symbol_cstr(), rb_intern3(), rb_sym_intern(), ruby_marshal_read_long(), and ruby_require_internal().
int rb_str_buf_cat_escaped_char | ( | VALUE | result, |
unsigned int | c, | ||
int | unicode_p | ||
) |
VALUE rb_str_cat_conv_enc_opts | ( | VALUE | newstr, |
long | ofs, | ||
const char * | ptr, | ||
long | len, | ||
rb_encoding * | from, | ||
int | ecflags, | ||
VALUE | ecopts | ||
) |
Definition at line 1006 of file string.c.
References len, ptr, rb_eIndexError, rb_raise(), rb_str_cat(), rb_str_modify(), RSTRING_LEN, and STR_SET_LEN.
Definition at line 2369 of file string.c.
References RString::capa.
Definition at line 9211 of file string.c.
References len, RSTRING_LEN, and str.
Definition at line 6111 of file string.c.
References ENCODING_GET, rb_enc_from_index(), rb_encoding, RSTRING_PTR, and str.
Referenced by rb_id_quote_unprintable(), and rb_inspect().
Definition at line 2445 of file string.c.
References len, RSTRING_LEN, RSTRING_PTR, and str.
Definition at line 2826 of file string.c.
References rb_ensure(), rb_str_locktmp(), rb_str_unlocktmp(), and str.
size_t rb_str_memsize | ( | VALUE | ) |
Definition at line 1453 of file string.c.
References FL_TEST, str, STR_HEAP_SIZE, STR_NOEMBED, STR_NOFREE, and STR_SHARED.
Definition at line 2066 of file string.c.
References assert, LONG_MAX, MAYBE_UNUSED, Qundef, rb_cString, rb_enc_get_index(), rb_str_plus(), RBASIC_CLASS, and RSTRING_GETMEM.
Definition at line 11034 of file string.c.
References len, ptr, and rb_encoding.
int rb_str_symname_p | ( | VALUE | ) |
Definition at line 11015 of file string.c.
References len, NULL, ptr, rb_default_external_encoding(), rb_default_internal_encoding(), rb_encoding, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, and sym.
Referenced by rb_id_quote_unprintable().
Definition at line 1280 of file string.c.
References OBJ_FROZEN_RAW.
Definition at line 1287 of file string.c.
References RBASIC_CLASS.
Definition at line 11159 of file string.c.
References argc, argv, rb_eArgError, rb_funcall_with_block_kw(), and rb_raise().