Ruby
1.9.3p547(2014-05-14revision45962)
|
#include "ruby/ruby.h"
#include "ruby/re.h"
#include "ruby/encoding.h"
#include "internal.h"
#include <assert.h>
#include <math.h>
#include <ctype.h>
Go to the source code of this file.
Data Structures | |
struct | tr |
Typedefs | |
typedef unsigned char * | USTR |
Enumerations | |
enum | neighbor_char { NEIGHBOR_NOT_CHAR, NEIGHBOR_FOUND, NEIGHBOR_WRAPPED } |
Variables | |
VALUE | rb_cString |
VALUE | rb_cSymbol |
VALUE | rb_fs |
static ID | id_to_s |
static const char | isspacetable [256] |
#define ascii_isspace | ( | c | ) | isspacetable[(unsigned char)(c)] |
Definition at line 5731 of file string.c.
Referenced by rb_str_rstrip_bang(), and rb_str_split_m().
#define BEG | ( | no | ) | (regs->beg[(no)]) |
Definition at line 20 of file string.c.
Referenced by rb_str_split_m(), rb_str_sub_bang(), rb_str_subpat_set(), scan_once(), and str_gsub().
#define CHAR_ESC_LEN 13 /* sizeof(\x{ hex of 32bit unsigned int } \0) */ |
Definition at line 4362 of file string.c.
Referenced by rb_str_buf_cat_escaped_char(), and rb_str_inspect().
#define CHECK_IF_ASCII | ( | c | ) |
Referenced by tr_trans().
#define END | ( | no | ) | (regs->end[(no)]) |
Definition at line 21 of file string.c.
Referenced by rb_str_split_m(), rb_str_sub_bang(), rb_str_subpat_set(), scan_once(), and str_gsub().
#define is_ascii_string | ( | str | ) | (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) |
Definition at line 118 of file string.c.
Referenced by rb_str_split_m(), and rb_str_upto().
#define is_broken_string | ( | str | ) | (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) |
Definition at line 119 of file string.c.
Referenced by rb_str_chomp_bang(), rb_str_count(), rb_str_index(), rb_str_rindex(), and rb_str_split_m().
Definition at line 4519 of file string.c.
Referenced by rb_str_dump().
#define lesser | ( | a, | |
b | |||
) | (((a)>(b))?(b):(a)) |
Definition at line 2206 of file string.c.
Referenced by rb_str_cmp().
Definition at line 30 of file string.c.
Referenced by rb_str_upto().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by Init_String(), rb_str_cmp_m(), rb_str_equal(), rb_str_match(), rb_str_match_m(), rb_str_sum(), and rb_str_upto().
#define rb_str_buf_new2 rb_str_buf_new_cstr |
#define rb_str_dup_frozen rb_str_new_frozen |
#define rb_str_new2 rb_str_new_cstr |
Referenced by rb_str_crypt(), rb_str_split(), rb_tainted_str_new_cstr(), and RUBY_ALIAS_FUNCTION().
#define rb_str_new3 rb_str_new_shared |
#define rb_str_new4 rb_str_new_frozen |
Referenced by rb_str_drop_bytes(), rb_str_each_char(), rb_str_each_codepoint(), rb_str_each_line(), rb_str_substr(), str_byte_substr(), and str_replace().
#define rb_str_new5 rb_str_new_with_class |
#define rb_tainted_str_new2 rb_tainted_str_new_cstr |
#define rb_usascii_str_new2 rb_usascii_str_new_cstr |
#define RESIZE_CAPA | ( | str, | |
capacity | |||
) |
Definition at line 100 of file string.c.
Referenced by rb_str_associate(), rb_str_splice_0(), rb_str_sub_bang(), rb_str_succ(), and str_buf_cat().
#define STR_ASSOC FL_USER3 |
Definition at line 58 of file string.c.
Referenced by rb_str_associate(), rb_str_new_frozen(), str_buf_cat(), and str_replace().
#define STR_ASSOC_P | ( | s | ) | FL_ALL((s), STR_NOEMBED|STR_ASSOC) |
Definition at line 60 of file string.c.
Referenced by rb_str_append(), rb_str_associate(), rb_str_associated(), rb_str_cat(), rb_str_freeze(), rb_str_new_frozen(), str_buf_cat(), and str_replace().
#define str_buf_cat2 | ( | str, | |
ptr | |||
) | str_buf_cat((str), (ptr), strlen(ptr)) |
Definition at line 1870 of file string.c.
Referenced by rb_str_inspect().
#define STR_BUF_MIN_SIZE 128 |
Definition at line 733 of file string.c.
Referenced by rb_str_buf_new().
#define STR_DEC_LEN | ( | str | ) |
Definition at line 89 of file string.c.
Referenced by rb_str_chomp_bang().
#define STR_EMBED_P | ( | str | ) | (!FL_TEST((str), STR_NOEMBED)) |
Definition at line 73 of file string.c.
Referenced by rb_str_associate(), rb_str_capacity(), rb_str_free(), rb_str_memsize(), rb_str_modify_expand(), rb_str_new_frozen(), rb_str_resize(), str_buf_cat(), str_discard(), str_independent(), and tr_trans().
#define STR_ENC_GET | ( | str | ) | rb_enc_from_index(ENCODING_GET(str)) |
Definition at line 121 of file string.c.
Referenced by chopped_length(), rb_enc_cr_str_copy_for_substr(), rb_enc_str_asciionly_p(), rb_enc_str_coderange(), rb_str_aref(), rb_str_capitalize_bang(), rb_str_clear(), rb_str_concat(), rb_str_downcase_bang(), rb_str_each_codepoint(), rb_str_export(), rb_str_export_locale(), rb_str_export_to_enc(), rb_str_index_m(), rb_str_inspect(), rb_str_justify(), rb_str_length(), rb_str_lstrip_bang(), rb_str_offset(), rb_str_ord(), rb_str_reverse(), rb_str_rindex_m(), rb_str_rpartition(), rb_str_rstrip_bang(), rb_str_shared_replace(), rb_str_split_m(), rb_str_squeeze_bang(), rb_str_strlen(), rb_str_sub_bang(), rb_str_sublen(), rb_str_substr(), rb_str_succ(), rb_str_swapcase_bang(), rb_str_upcase_bang(), RUBY_ALIAS_FUNCTION(), scan_once(), single_byte_optimizable(), str_byte_substr(), str_gsub(), str_strlen(), and sym_inspect().
#define str_make_independent | ( | str | ) | str_make_independent_expand((str), 0L) |
Definition at line 1316 of file string.c.
Referenced by rb_str_associate(), rb_str_modify(), and str_modify_keep_cr().
#define STR_NOCAPA (STR_NOEMBED|ELTS_SHARED|STR_ASSOC) |
Definition at line 61 of file string.c.
Referenced by rb_str_shared_replace().
#define STR_NOCAPA_P | ( | s | ) | (FL_TEST((s),STR_NOEMBED) && FL_ANY((s),ELTS_SHARED|STR_ASSOC)) |
Definition at line 62 of file string.c.
Referenced by rb_str_capacity(), rb_str_resize(), and rb_str_shared_replace().
#define STR_NOEMBED FL_USER1 |
Definition at line 56 of file string.c.
Referenced by rb_str_buf_new(), rb_str_drop_bytes(), and str_replace_shared().
#define STR_SET_EMBED | ( | str | ) | FL_UNSET((str), STR_NOEMBED) |
Definition at line 72 of file string.c.
Referenced by rb_str_clear(), rb_str_drop_bytes(), rb_str_resize(), rb_str_shared_replace(), and str_replace_shared().
#define STR_SET_EMBED_LEN | ( | str, | |
n | |||
) |
Definition at line 74 of file string.c.
Referenced by rb_str_clear(), rb_str_drop_bytes(), rb_str_resize(), rb_str_shared_replace(), and str_replace_shared().
#define STR_SET_LEN | ( | str, | |
n | |||
) |
Definition at line 80 of file string.c.
Referenced by rb_str_chomp_bang(), rb_str_chop_bang(), rb_str_delete_bang(), rb_str_justify(), rb_str_lstrip_bang(), rb_str_reverse(), rb_str_rstrip_bang(), rb_str_set_len(), rb_str_splice_0(), rb_str_squeeze_bang(), rb_str_sub_bang(), rb_str_succ(), str_buf_cat(), and str_new().
#define STR_SET_NOEMBED | ( | str | ) |
Definition at line 68 of file string.c.
Referenced by rb_str_resize(), rb_str_shared_replace(), RUBY_ALIAS_FUNCTION(), str_make_independent_expand(), str_new(), str_replace(), and tr_trans().
#define STR_SHARED FL_USER2 /* = ELTS_SHARED */ |
#define STR_SHARED_P | ( | s | ) | FL_ALL((s), STR_NOEMBED|ELTS_SHARED) |
Definition at line 59 of file string.c.
Referenced by rb_str_associate(), rb_str_associated(), rb_str_drop_bytes(), rb_str_free(), rb_str_memsize(), rb_str_new_frozen(), rb_str_set_len(), RUBY_ALIAS_FUNCTION(), str_discard(), str_independent(), and str_replace().
#define STR_TMPLOCK FL_USER7 |
Definition at line 55 of file string.c.
Referenced by rb_str_unlocktmp(), RUBY_ALIAS_FUNCTION(), and str_modifiable().
#define STR_UNSET_NOCAPA | ( | s | ) |
Definition at line 63 of file string.c.
Referenced by rb_str_modify_expand(), rb_str_shared_replace(), and str_make_independent_expand().
#define TR_TABLE_SIZE 257 |
Definition at line 5313 of file string.c.
Referenced by rb_str_count(), rb_str_delete_bang(), and rb_str_squeeze_bang().
enum neighbor_char |
Definition at line 6261 of file string.c.
References re_registers::beg, re_registers::end, p, rb_enc_ascget(), rb_enc_prev_char, RSTRING_LEN, RSTRING_PTR, and STR_ENC_GET.
Referenced by rb_str_chop(), and rb_str_chop_bang().
|
static |
Definition at line 181 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, ENC_CODERANGE_VALID, len, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, rb_enc_asciicompat, rb_enc_precise_mbclen(), rb_enc_to_index, and search_nonascii().
Referenced by rb_enc_cr_str_buf_cat(), rb_enc_str_coderange(), and rb_str_sub_bang().
|
static |
Definition at line 2780 of file string.c.
References i, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, MBCLEN_INVALID_P, NEIGHBOR_FOUND, NEIGHBOR_WRAPPED, and rb_enc_precise_mbclen().
Referenced by enc_succ_alnum_char().
|
inlinestatic |
Definition at line 934 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_VALID, ISASCII, p, rb_enc_asciicompat, rb_enc_fast_mbclen(), rb_enc_mbclen(), rb_enc_mbmaxlen, rb_enc_mbminlen, and search_nonascii().
Referenced by rb_enc_strlen(), and rb_str_sublen().
|
static |
Definition at line 2823 of file string.c.
References enc_pred_char(), enc_succ_char(), MEMCPY, NEIGHBOR_FOUND, NEIGHBOR_NOT_CHAR, NEIGHBOR_WRAPPED, ONIGENC_CODE_TO_MBC_MAXLEN, ONIGENC_CTYPE_ALPHA, ONIGENC_CTYPE_DIGIT, range, rb_enc_isctype, and rb_enc_mbc_to_codepoint.
Referenced by rb_str_succ().
|
static |
Definition at line 2746 of file string.c.
References i, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, MBCLEN_INVALID_P, NEIGHBOR_FOUND, NEIGHBOR_WRAPPED, and rb_enc_precise_mbclen().
Referenced by enc_succ_alnum_char(), and rb_str_succ().
Definition at line 3550 of file string.c.
References Check_Type, NIL_P, rb_check_string_type(), rb_reg_quote(), rb_reg_regcomp(), T_REGEXP, T_STRING, and TYPE.
Referenced by rb_str_match_m(), rb_str_scan(), rb_str_split_m(), rb_str_sub_bang(), and str_gsub().
void Init_String | ( | void | ) |
Definition at line 7777 of file string.c.
References CLASS_OF, Qnil, rb_cObject, rb_cString, rb_cSymbol, rb_define_alloc_func(), rb_define_class(), rb_define_method(), rb_define_singleton_method(), rb_define_variable(), rb_fs, rb_include_module(), rb_intern, rb_mComparable, rb_obj_encoding(), rb_str_aref_m(), rb_str_aset_m(), rb_str_bytesize(), rb_str_byteslice(), rb_str_capitalize(), rb_str_capitalize_bang(), rb_str_casecmp(), rb_str_center(), rb_str_chomp(), rb_str_chomp_bang(), rb_str_chop(), rb_str_chop_bang(), rb_str_chr(), rb_str_clear(), rb_str_cmp_m(), rb_str_concat(), rb_str_count(), rb_str_crypt(), rb_str_delete(), rb_str_delete_bang(), rb_str_downcase(), rb_str_downcase_bang(), rb_str_dump(), rb_str_each_byte(), rb_str_each_char(), rb_str_each_codepoint(), rb_str_each_line(), rb_str_empty(), rb_str_end_with(), rb_str_eql(), rb_str_equal(), rb_str_force_encoding(), rb_str_format_m(), rb_str_getbyte(), rb_str_gsub(), rb_str_gsub_bang(), rb_str_hash_m(), rb_str_hex(), rb_str_include(), rb_str_index_m(), rb_str_init(), rb_str_insert(), rb_str_inspect(), rb_str_intern(), rb_str_is_ascii_only_p(), rb_str_length(), rb_str_ljust(), rb_str_lstrip(), rb_str_lstrip_bang(), rb_str_match(), rb_str_match_m(), rb_str_oct(), rb_str_ord(), rb_str_partition(), rb_str_plus(), rb_str_prepend(), rb_str_replace(), rb_str_reverse(), rb_str_reverse_bang(), rb_str_rindex_m(), rb_str_rjust(), rb_str_rpartition(), rb_str_rstrip(), rb_str_rstrip_bang(), rb_str_s_try_convert(), rb_str_scan(), rb_str_setbyte(), rb_str_slice_bang(), rb_str_split_m(), rb_str_squeeze(), rb_str_squeeze_bang(), rb_str_start_with(), rb_str_strip(), rb_str_strip_bang(), rb_str_sub(), rb_str_sub_bang(), rb_str_succ(), rb_str_succ_bang(), rb_str_sum(), rb_str_swapcase(), rb_str_swapcase_bang(), rb_str_times(), rb_str_to_f(), rb_str_to_i(), rb_str_to_s(), rb_str_tr(), rb_str_tr_bang(), rb_str_tr_s(), rb_str_tr_s_bang(), rb_str_upcase(), rb_str_upcase_bang(), rb_str_upto(), rb_str_valid_encoding_p(), rb_sym_all_symbols(), rb_sym_to_s(), rb_undef_alloc_func(), rb_undef_method(), str_alloc(), sym_aref(), sym_capitalize(), sym_casecmp(), sym_cmp(), sym_downcase(), sym_empty(), sym_encoding(), sym_equal(), sym_inspect(), sym_length(), sym_match(), sym_succ(), sym_swapcase(), sym_to_proc(), sym_to_sym(), and sym_upcase().
Definition at line 773 of file string.c.
References rb_str_tmp_new(), and RSTRING_PTR.
Definition at line 1450 of file string.c.
References rb_check_convert_type(), and T_STRING.
Referenced by ary_join_1(), constant_arg(), env_has_value(), env_rassoc(), get_pat(), gzreader_gets(), io_encoding_set(), make_exception(), marshal_load(), month_arg(), prepare_getline_args(), range_each(), range_step(), rb_ary_join(), rb_ary_times(), rb_check_sockaddr_string_type(), rb_convert_to_integer(), rb_f_kill(), rb_io_extract_encoding_option(), rb_str_end_with(), rb_str_format(), rb_str_index_m(), rb_str_partition(), rb_str_rindex_m(), rb_str_rpartition(), rb_str_s_try_convert(), rb_str_start_with(), rb_String(), rb_to_encoding_index(), rb_to_id(), reg_operand(), setup_narg(), strio_each(), strio_getline(), strio_readlines(), syck_defaultresolver_detect_implicit(), syck_emitter_reset(), syck_parser_assign_io(), syck_resolver_tagurize(), trap_handler(), and utc_offset_arg().
|
static |
Definition at line 1914 of file string.c.
References coderange_scan(), ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_UNKNOWN, ENC_CODERANGE_VALID, ENCODING_CODERANGE_SET, ENCODING_GET, ENCODING_IS_ASCII8BIT, rb_eArgError, rb_eEncCompatError, rb_enc_asciicompat, rb_enc_from_index(), rb_enc_name, rb_enc_str_coderange(), rb_raise(), rb_str_buf_cat(), RSTRING_LEN, and str_buf_cat().
Referenced by rb_enc_str_buf_cat(), rb_str_buf_append(), and rb_str_buf_cat_ascii().
Definition at line 288 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, rb_enc_asciicompat, RSTRING_END, RSTRING_LEN, RSTRING_PTR, search_nonascii(), str_enc_copy(), and STR_ENC_GET.
Referenced by rb_str_chop(), rb_str_each_line(), rb_str_reverse(), rb_str_subseq(), rb_str_substr(), rb_str_succ(), and rb_str_times().
Definition at line 317 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_SET, and str_enc_copy().
Referenced by rb_str_new_frozen(), RUBY_ALIAS_FUNCTION(), str_replace(), and str_replace_shared().
char* rb_enc_nth | ( | const char * | p, |
const char * | e, | ||
long | nth, | ||
rb_encoding * | enc | ||
) |
Definition at line 1523 of file string.c.
References str_nth_len().
Referenced by iconv_iconv(), rb_str_ellipsize(), and rb_str_format().
int rb_enc_str_asciionly_p | ( | VALUE | str | ) |
Definition at line 337 of file string.c.
References ENC_CODERANGE_7BIT, FALSE, rb_enc_asciicompat, rb_enc_str_coderange(), STR_ENC_GET, and TRUE.
Referenced by file_path_convert(), rb_enc_compatible(), rb_reg_quote(), and rb_reg_s_union().
VALUE rb_enc_str_buf_cat | ( | VALUE | str, |
const char * | ptr, | ||
long | len, | ||
rb_encoding * | ptr_enc | ||
) |
Definition at line 2000 of file string.c.
References ENC_CODERANGE_UNKNOWN, NULL, rb_enc_cr_str_buf_cat(), and rb_enc_to_index.
Referenced by rb_reg_regsub(), and str_gsub().
int rb_enc_str_coderange | ( | VALUE | str | ) |
Definition at line 324 of file string.c.
References coderange_scan(), ENC_CODERANGE, ENC_CODERANGE_SET, ENC_CODERANGE_UNKNOWN, RSTRING_LEN, RSTRING_PTR, and STR_ENC_GET.
Referenced by parser_str_new(), prepare_getline_args(), rb_econv_prepare_options(), rb_enc_compatible(), rb_enc_cr_str_buf_cat(), rb_enc_str_asciionly_p(), rb_external_str_new_with_enc(), rb_file_expand_path_internal(), rb_file_s_basename(), rb_intern3(), rb_intern_str(), rb_reg_initialize_str(), rb_reg_prepare_enc(), rb_reg_preprocess_dregexp(), rb_str_comparable(), rb_str_hash(), rb_str_is_ascii_only_p(), rb_str_succ(), rb_str_valid_encoding_p(), reg_fragment_setenc_gen(), str_transcode0(), and w_symbol().
VALUE rb_enc_str_new | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | enc | ||
) |
Definition at line 424 of file string.c.
References rb_enc_associate(), and rb_str_new().
Referenced by do_opendir(), econv_get_replacement(), err_append(), fix_string_encoding(), fole_missing(), foletypelib_name(), foletypelib_path(), get_user_from_path(), io_getc(), lex_get_str(), ole_wc2vstr(), parser_str_new(), prepare_getline_args(), rb_enc_uint_chr(), rb_io_getline_1(), rb_push_glob(), rb_reg_initialize(), rb_reg_initialize_m(), rb_reg_source(), rb_str_upto(), rb_w32_conv_from_wchar(), register_symid(), strio_getc(), strio_init(), strio_substr(), strio_ungetc(), sym_inspect(), and transcode_loop().
long rb_enc_strlen | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc | ||
) |
Definition at line 980 of file string.c.
References ENC_CODERANGE_UNKNOWN, and enc_strlen().
Referenced by rb_str_format(), and update_char_offset().
long rb_enc_strlen_cr | ( | const char * | p, |
const char * | e, | ||
rb_encoding * | enc, | ||
int * | cr | ||
) |
Definition at line 986 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, ENC_CODERANGE_VALID, ISASCII, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, p, rb_enc_asciicompat, rb_enc_mbmaxlen, rb_enc_mbminlen, rb_enc_precise_mbclen(), and search_nonascii().
Referenced by str_strlen().
Definition at line 549 of file string.c.
References rb_default_external_encoding(), and rb_external_str_new_with_enc().
Referenced by fsdbm_delete(), fsdbm_delete_if(), fsdbm_each_key(), fsdbm_each_pair(), fsdbm_each_value(), fsdbm_fetch(), fsdbm_invert(), fsdbm_key(), fsdbm_keys(), fsdbm_select(), fsdbm_shift(), fsdbm_to_a(), fsdbm_to_hash(), fsdbm_values(), ruby_script(), and set_arg0().
Definition at line 555 of file string.c.
References rb_default_external_encoding(), rb_external_str_new_with_enc(), and strlen().
Referenced by ruby_set_argv().
VALUE rb_external_str_new_with_enc | ( | const char * | ptr, |
long | len, | ||
rb_encoding * | eenc | ||
) |
Definition at line 534 of file string.c.
References ENC_CODERANGE_7BIT, rb_ascii8bit_encoding(), rb_default_internal_encoding(), rb_enc_associate(), rb_enc_str_coderange(), rb_str_conv_enc(), rb_tainted_str_new(), and rb_usascii_encoding().
Referenced by coverage(), debug_lines(), dir_each(), dir_read(), gettable_gen(), push_pattern(), rb_external_str_new(), rb_external_str_new_cstr(), rb_filesystem_str_new(), rb_filesystem_str_new_cstr(), rb_locale_str_new(), and rb_locale_str_new_cstr().
Definition at line 573 of file string.c.
References rb_external_str_new_with_enc(), and rb_filesystem_encoding().
Definition at line 579 of file string.c.
References rb_external_str_new_with_enc(), rb_filesystem_encoding(), and strlen().
Referenced by env_fetch(), etc_sysconfdir(), etc_systmpdir(), rb_f_getenv(), and search_required().
void rb_free_tmp_buffer | ( | volatile VALUE * | store | ) |
Definition at line 781 of file string.c.
References rb_str_clear().
Definition at line 561 of file string.c.
References rb_external_str_new_with_enc(), and rb_locale_encoding().
Referenced by curses_getch(), env_str_new(), and window_getch().
Definition at line 567 of file string.c.
References rb_external_str_new_with_enc(), rb_locale_encoding(), and strlen().
Referenced by curses_getstr(), filename_completion_proc_call(), hist_each(), hist_get(), rb_remove_history(), readline_attempted_completion_function(), readline_readline(), time_zone(), username_completion_proc_call(), and window_getstr().
Definition at line 854 of file string.c.
References OBJ_TAINT, OBJ_TAINTED, rb_any_to_s(), rb_funcall(), T_STRING, and TYPE.
Referenced by ary_join_1(), err_append(), exc_inspect(), fdbm_store(), io_write(), pack_pack(), random_rand(), range_to_s(), rb_check_type(), rb_gzwriter_write(), rb_inspect(), rb_io_puts(), rb_io_syswrite(), rb_io_write_nonblock(), rb_p(), rb_str_format(), rb_str_sub_bang(), readline_attempted_completion_function(), reg_fragment_check_gen(), setup_exception(), str_gsub(), strio_write(), and tcl_protect_core().
Definition at line 2047 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_SET, len, OBJ_INFECT, rb_enc_associate(), rb_enc_check(), rb_str_buf_append(), rb_str_modify_expand(), RSTRING, RSTRING_LEN, RSTRING_PTR, STR_ASSOC_P, and StringValue.
Referenced by argf_read(), dir_inspect(), dt_lite_jisx0301(), eval_string_with_cref(), fc_path(), gzfile_error_inspect(), iconv_s_conv(), inspect_i(), inspect_range(), inspect_struct(), iso8601_timediv(), join_der_i(), key2keyname(), load_failed(), make_version_str(), method_inspect(), ole_raise(), ossl_sslctx_set_ciphers(), ossl_x509extfactory_create_ext(), parser_here_document(), path_sub_ext(), random_rand(), range_to_s(), rb_io_inspect(), rb_mod_to_s(), rb_reg_s_union(), rb_set_class_path_string(), rb_stat_inspect(), rb_str_concat(), rb_str_ellipsize(), rb_str_insert(), reg_compile_gen(), sockopt_inspect(), strscan_concat(), syck_resolver_transfer(), sys_fail2(), tcl_protect_core(), and tk_install_cmd_core().
Definition at line 3136 of file string.c.
References FIX2LONG, INT2FIX, len, NIL_P, NUM2LONG(), Qfalse, Qnil, rb_range_beg_len(), rb_str_dup(), rb_str_index(), rb_str_subpat(), rb_str_substr(), RSTRING_LEN, STR_ENC_GET, str_strlen(), T_FIXNUM, T_REGEXP, T_STRING, and TYPE.
Referenced by rb_str_aref_m().
Definition at line 3231 of file string.c.
References NUM2LONG(), rb_eArgError, rb_raise(), rb_str_aref(), rb_str_subpat(), rb_str_substr(), T_REGEXP, and TYPE.
Referenced by Init_String(), rb_str_slice_bang(), and sym_aref().
Definition at line 3394 of file string.c.
References re_registers::beg, FIX2LONG, INT2FIX, len, NUM2LONG(), rb_eIndexError, rb_raise(), rb_range_beg_len(), rb_str_index(), rb_str_splice(), rb_str_sublen(), rb_str_subpat_set(), str_strlen(), T_FIXNUM, T_REGEXP, T_STRING, and TYPE.
Referenced by rb_str_aset_m().
Definition at line 3458 of file string.c.
References NUM2LONG(), rb_eArgError, rb_raise(), rb_str_aset(), rb_str_splice(), rb_str_subpat_set(), T_REGEXP, and TYPE.
Referenced by Init_String(), and rb_str_slice_bang().
Definition at line 1373 of file string.c.
References add, FL_SET, rb_ary_concat(), rb_check_frozen, RBASIC, RESIZE_CAPA, RSTRING, RSTRING_LEN, STR_ASSOC, STR_ASSOC_P, STR_EMBED_P, str_make_independent, and STR_SHARED_P.
Referenced by pack_pack(), and pack_unpack().
Definition at line 1404 of file string.c.
References Qfalse, RSTRING, STR_ASSOC_P, and STR_SHARED_P.
Referenced by pack_unpack().
Definition at line 2031 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_SET, ENCODING_GET, OBJ_INFECT, rb_enc_cr_str_buf_cat(), RSTRING_LEN, and RSTRING_PTR.
Referenced by ary_join_0(), ary_join_1(), env_inspect(), exc_inspect(), iconv_conv(), iconv_failure_inspect(), inspect_ary(), inspect_i(), literal_concat0(), match_inspect(), method_inspect(), rb_digest_instance_inspect(), rb_file_join(), rb_reg_preprocess_dregexp(), rb_str_append(), and str_gsub().
Definition at line 1873 of file string.c.
References rb_eArgError, rb_raise(), and str_buf_cat().
Referenced by append_utf8(), appendline(), encodes(), env_inspect(), exc_inspect(), iconv_convert(), iconv_failure_inspect(), json_string_unescape(), match_inspect(), pack_pack(), pack_unpack(), parser_nextc(), qpencode(), rb_enc_cr_str_buf_cat(), rb_file_expand_path_internal(), rb_reg_expr_str(), rb_str_buf_cat2(), rb_str_buf_cat_escaped_char(), rb_str_buf_new_cstr(), rb_str_cat(), unescape_escaped_nonascii(), unescape_nonascii(), w_nbyte(), zstream_append_buffer(), and zstream_append_input().
Definition at line 1883 of file string.c.
References rb_str_buf_cat(), and strlen().
Referenced by addrinfo_inspect(), env_inspect(), iconv_failure_inspect(), inspect_ary(), inspect_enumerator(), inspect_hash(), inspect_i(), match_inspect(), method_inspect(), rb_digest_instance_inspect(), rb_enc_reg_error_desc(), rb_reg_desc(), rb_reg_to_s(), and rb_stat_inspect().
Definition at line 2007 of file string.c.
References ALLOCA_N, buf, ENC_CODERANGE_7BIT, ENC_CODERANGE_VALID, ENCODING_GET, rb_enc_asciicompat, rb_enc_codelen(), rb_enc_cr_str_buf_cat(), rb_enc_from_index(), rb_enc_mbcput, rb_enc_mbmaxlen, and strlen().
Referenced by prepare_getline_args(), and rb_reg_s_union().
int rb_str_buf_cat_escaped_char | ( | VALUE | result, |
unsigned int | c, | ||
int | unicode_p | ||
) |
Definition at line 4365 of file string.c.
References buf, CHAR_ESC_LEN, ISPRINT, rb_str_buf_cat(), snprintf, and strlen().
Referenced by rb_reg_expr_str(), and rb_str_inspect().
Definition at line 736 of file string.c.
References ALLOC_N, FL_SET, rb_cString, RSTRING, str_alloc(), STR_BUF_MIN_SIZE, and STR_NOEMBED.
Referenced by appendline(), copy_stream_body(), copy_stream_fallback_body(), JSON_parse_string(), marshal_dump(), pack_pack(), parser_nextc(), pst_to_s(), rb_ary_join(), rb_digest_instance_inspect(), rb_econv_substr_append(), rb_enc_vsprintf(), rb_file_join(), rb_reg_preprocess(), rb_reg_regsub(), rb_reg_s_union(), rb_str_buf_new_cstr(), rb_str_format(), rb_str_inspect(), str_gsub(), zstream_append_buffer(), and zstream_append_input().
Definition at line 752 of file string.c.
References rb_str_buf_cat(), rb_str_buf_new(), and strlen().
Referenced by load_failed().
Definition at line 1153 of file string.c.
References LONG2NUM, and RSTRING_LEN.
Referenced by Init_String().
Definition at line 4136 of file string.c.
References NUM2LONG(), rb_eArgError, rb_raise(), str_byte_aref(), and str_byte_substr().
Referenced by Init_String().
size_t rb_str_capacity | ( | VALUE | str | ) |
Definition at line 357 of file string.c.
References RSTRING, RSTRING_EMBED_LEN_MAX, STR_EMBED_P, and STR_NOCAPA_P.
Referenced by append_fspath(), econv_primitive_convert(), rb_econv_substr_append(), rb_str_set_len(), and rb_str_vcatf().
Definition at line 4899 of file string.c.
References rb_str_capitalize_bang(), and rb_str_dup().
Referenced by Init_String(), and sym_capitalize().
Definition at line 4851 of file string.c.
References Qnil, rb_enc_codepoint_len(), rb_enc_islower, rb_enc_isupper, rb_enc_mbcput, rb_enc_tolower(), rb_enc_toupper(), rb_str_check_dummy_enc(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, and str_modify_keep_cr().
Referenced by Init_String(), and rb_str_capitalize().
Definition at line 2375 of file string.c.
References INT2FIX, len, memcmp(), Qnil, rb_enc_ascget(), rb_enc_compatible(), rb_enc_mbclen(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), StringValue, and TOUPPER.
Referenced by Init_String(), and sym_casecmp().
Definition at line 1889 of file string.c.
References len, p, rb_eArgError, rb_raise(), rb_str_buf_cat(), rb_str_modify_expand(), RSTRING, and STR_ASSOC_P.
Referenced by date_strftime_internal(), eval_string_with_cref(), flo_to_s(), iconv_convert(), inspect_range(), inspect_sockaddr(), io_getc(), io_shift_cbuf(), moreswitches(), ole_excepinfo2msg(), parser_here_document(), process_sflag(), range_to_s(), rb_file_dirname(), rb_id2str(), rb_io_inspect(), rb_str_cat2(), rb_str_concat(), rb_str_ellipsize(), rb_syck_output_handler(), realpath_rec(), reg_compile_gen(), strio_write(), time_strftime(), and warn_deprecated().
Definition at line 1908 of file string.c.
References rb_str_cat(), and strlen().
Referenced by addrinfo_inspect(), argf_next_argv(), cannot_be_coerced_into_BigDecimal(), cbsubst_get_subst_arg(), cbsubst_sym_to_subst(), cbsubst_table_setup(), clsid_from_remote(), dir_inspect(), econv_description(), econv_inspect(), err_append(), f_format(), fc_path(), foleparam_inspect(), folevariable_inspect(), gc_profile_result(), gzfile_error_inspect(), iconv_fail(), insn_data_to_s_detail(), inspect2(), inspect_i(), inspect_obj(), inspect_sockaddr(), inspect_struct(), make_inspect(), make_version_str(), name_err_mesg_to_str(), nucomp_inspect(), nurat_inspect(), ole_excepinfo2msg(), ole_hresult2msg(), ole_raise(), oletypelib_path(), ossl_make_error(), ossl_ssl_get_state(), ossl_sslctx_set_ciphers(), path_check_0(), proc_options(), process_sflag(), pst_inspect(), pst_message(), rb_econv_open_exc(), rb_find_file_ext_safe(), rb_io_inspect(), rb_iseq_disasm(), rb_iseq_disasm_insn(), rb_mod_to_s(), rb_set_class_path(), rb_set_class_path_string(), realpath_rec(), search_required(), sockopt_inspect(), and sys_fail2().
|
static |
Definition at line 4662 of file string.c.
References rb_eEncCompatError, rb_enc_dummy_p(), rb_enc_name, and rb_raise().
Referenced by rb_str_capitalize_bang(), rb_str_downcase_bang(), rb_str_rstrip_bang(), rb_str_swapcase_bang(), and rb_str_upcase_bang().
Definition at line 6461 of file string.c.
References rb_str_chomp_bang(), and rb_str_dup().
Referenced by Init_String().
Definition at line 6341 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_CLEAR, is_broken_string, len, memcmp(), NIL_P, p, Qnil, rb_default_rs, rb_enc_ascget(), rb_enc_check(), rb_enc_get(), rb_enc_is_newline, rb_enc_left_char_head, rb_enc_mbminlen, rb_rs, rb_scan_args(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, STR_DEC_LEN, str_modify_keep_cr(), STR_SET_LEN, and StringValue.
Referenced by Init_String(), and rb_str_chomp().
Definition at line 6323 of file string.c.
References chopped_length(), OBJ_INFECT, rb_enc_cr_str_copy_for_substr(), rb_str_new5, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 6288 of file string.c.
References chopped_length(), ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_CLEAR, len, Qnil, RSTRING_LEN, RSTRING_PTR, str_modify_keep_cr(), and STR_SET_LEN.
Referenced by Init_String().
Definition at line 3952 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, rb_enc_asciicompat, RSTRING_PTR, str_discard(), STR_ENC_GET, STR_SET_EMBED, and STR_SET_EMBED_LEN.
Referenced by Init_String(), and rb_free_tmp_buffer().
Definition at line 2234 of file string.c.
References ENCODING_GET, lesser, memcmp(), rb_str_comparable(), and RSTRING_GETMEM.
Referenced by ary2list(), ary2list2(), ole_method_event(), ole_search_event(), ole_search_event_at(), oleclass_from_typelib(), oletypelib_search_registry(), rb_digest_instance_equal(), rb_str_cmp_m(), rb_str_upto(), sort_2(), syck_resolver_transfer(), typeinfo_from_ole(), and typelib_file_from_typelib().
Definition at line 2335 of file string.c.
References FIX2LONG, FIXNUM_P, LONG2FIX, LONG2NUM, NIL_P, Qnil, rb_funcall(), rb_intern, rb_respond_to(), rb_str_cmp(), result, T_STRING, and TYPE.
Referenced by Init_String(), and sym_cmp().
long rb_str_coderange_scan_restartable | ( | const char * | s, |
const char * | e, | ||
rb_encoding * | enc, | ||
int * | cr | ||
) |
Definition at line 230 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, ENC_CODERANGE_UNKNOWN, ENC_CODERANGE_VALID, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, MBCLEN_INVALID_P, p, rb_enc_asciicompat, rb_enc_precise_mbclen(), rb_enc_to_index, and search_nonascii().
Referenced by rb_io_getline_fast(), rb_reg_expr_str(), rb_str_format(), read_all(), and str_encode_associate().
Definition at line 2209 of file string.c.
References ENC_CODERANGE_7BIT, ENCODING_GET, FALSE, rb_enc_asciicompat, rb_enc_from_index(), rb_enc_str_coderange(), RSTRING_LEN, and TRUE.
Referenced by rb_str_cmp(), rb_str_hash_cmp(), and str_eql().
Definition at line 2088 of file string.c.
References ALLOCA_N, buf, ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, FIX2LONG, FIXNUM_P, len, ONIGERR_INVALID_CODE_POINT_VALUE, ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, rb_ascii8bit_encoding(), rb_enc_associate(), rb_enc_codelen(), rb_enc_mbcput, rb_enc_name, rb_enc_precise_mbclen(), rb_eRangeError, rb_num_to_uint(), rb_raise(), rb_str_append(), rb_str_cat(), rb_str_resize(), rb_usascii_encoding(), RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, T_BIGNUM, and TYPE.
Referenced by clsid_from_remote(), f_format(), foleparam_inspect(), folevariable_inspect(), iconv_convert(), Init_String(), insn_data_to_s_detail(), inspect_enumerator(), iseq_compile_each(), make_inspect(), nucomp_inspect(), nurat_inspect(), ole_typedesc2val(), oletypelib_path(), rb_iseq_disasm(), rb_iseq_disasm_insn(), string_to_c_internal(), and strio_ungetc().
VALUE rb_str_conv_enc | ( | VALUE | str, |
rb_encoding * | from, | ||
rb_encoding * | to | ||
) |
Definition at line 528 of file string.c.
References Qnil, and rb_str_conv_enc_opts().
Referenced by file_path_convert(), rb_external_str_new_with_enc(), rb_file_s_basename(), rb_gzreader_ungetc(), rb_gzwriter_write(), rb_str_export(), rb_str_export_locale(), rb_str_export_to_enc(), realpath_rec(), strio_ungetc(), and strio_write().
Definition at line 5652 of file string.c.
References argc, i, INT2FIX, INT2NUM(), is_broken_string, rb_eArgError, rb_enc_asciicompat, rb_enc_check(), rb_enc_codepoint_len(), rb_raise(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, StringValue, tr_find(), tr_setup_table(), and TR_TABLE_SIZE.
Referenced by Init_String().
Definition at line 6801 of file string.c.
References crypt(), ISASCII, OBJ_INFECT, rb_eArgError, rb_raise(), rb_str_new2, rb_sys_fail(), result, RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_String().
Definition at line 5483 of file string.c.
References rb_str_delete_bang(), and rb_str_dup().
Referenced by Init_String().
Definition at line 5405 of file string.c.
References argc, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, i, Qnil, rb_eArgError, rb_enc_asciicompat, rb_enc_check(), rb_enc_codepoint_len(), rb_enc_mbcput, rb_raise(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, str_modify_keep_cr(), STR_SET_LEN, StringValue, tr_find(), tr_setup_table(), and TR_TABLE_SIZE.
Referenced by Init_String(), rb_str_delete(), and tr_trans().
Definition at line 4828 of file string.c.
References rb_str_downcase_bang(), and rb_str_dup().
Referenced by Init_String(), and sym_downcase().
Definition at line 4763 of file string.c.
References Qnil, rb_enc_asciicompat, rb_enc_codepoint_len(), rb_enc_isascii, rb_enc_isupper, rb_enc_mbcput, rb_enc_tolower(), rb_str_check_dummy_enc(), RSTRING_END, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, and str_modify_keep_cr().
Referenced by Init_String(), and rb_str_downcase().
Definition at line 3246 of file string.c.
References ELTS_SHARED, ENC_CODERANGE_CLEAR, len, memmove(), rb_str_new4, RBASIC, RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, RSTRING_PTR, str_modifiable(), STR_NOEMBED, STR_SET_EMBED, STR_SET_EMBED_LEN, STR_SHARED_P, and xfree().
Referenced by econv_primitive_convert(), rb_str_splice_0(), and rb_str_subseq().
Definition at line 4530 of file string.c.
References ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, IS_EVSTR, ISPRINT, len, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, OnigEncodingTypeST::name, OBJ_INFECT, p, rb_ascii8bit_encoding(), rb_enc_asciicompat, rb_enc_associate(), rb_enc_get(), rb_enc_mbc_to_codepoint, rb_enc_precise_mbclen(), rb_str_new5, rb_utf8_encoding(), result, RSTRING_LEN, RSTRING_PTR, snprintf, and strlen().
Referenced by Init_String(), inspect1(), inspect2(), make_econv_exception(), rb_econv_prepare_options(), and sockopt_inspect().
Definition at line 905 of file string.c.
References rb_obj_class(), and str_duplicate().
Referenced by cannot_be_coerced_into_BigDecimal(), check_exec_redirect(), classname(), convert_encoding(), cParser_source(), date__parse(), dir_path(), econv_convert(), encoded_dup(), eval_string_with_cref(), exc_inspect(), fc_path(), fdbm_delete_if(), fsdbm_delete_if(), insn_operand_intern(), inspect_range(), iseq_compile_each(), make_inspectname(), name_err_mesg_to_str(), range_to_s(), rb_deflate_init_copy(), rb_exec_arg_addopt(), rb_file_path(), rb_find_file_ext_safe(), rb_gzfile_comment(), rb_gzfile_orig_name(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), rb_id2str(), rb_mod_name(), rb_mod_to_s(), rb_set_class_path(), rb_set_class_path_string(), rb_str_aref(), rb_str_capitalize(), rb_str_chomp(), rb_str_delete(), rb_str_downcase(), rb_str_encode_ospath(), rb_str_justify(), rb_str_lstrip(), rb_str_reverse(), rb_str_rstrip(), rb_str_squeeze(), rb_str_strip(), rb_str_sub(), rb_str_swapcase(), rb_str_tr(), rb_str_tr_s(), rb_str_upcase(), rb_str_upto(), realpath_rec(), rsock_ipaddr(), RUBY_ALIAS_FUNCTION(), and str_gsub().
Definition at line 6156 of file string.c.
References i, INT2FIX, rb_yield(), RETURN_ENUMERATOR, RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String(), and rb_str_each_codepoint().
Definition at line 6187 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_VALID, i, len, rb_enc_fast_mbclen(), rb_enc_get(), rb_enc_mbclen(), rb_str_new4, rb_str_subseq(), rb_yield(), RETURN_ENUMERATOR, RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 6238 of file string.c.
References re_registers::end, rb_enc_codepoint_len(), rb_str_each_byte(), rb_str_new4, rb_yield(), RETURN_ENUMERATOR, RSTRING_END, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, and UINT2NUM().
Referenced by Init_String().
Definition at line 6039 of file string.c.
References len, memcmp(), NIL_P, OBJ_INFECT, p, rb_default_rs, rb_enc_check(), rb_enc_codepoint, rb_enc_codepoint_len(), rb_enc_cr_str_copy_for_substr(), rb_enc_get(), rb_enc_is_newline, rb_enc_left_char_head, rb_enc_mbclen(), rb_rs, rb_scan_args(), rb_str_new4, rb_str_new5, rb_yield(), RETURN_ENUMERATOR, RSTRING_END, RSTRING_LEN, RSTRING_PTR, str_mod_check(), and StringValue.
Referenced by Init_String().
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
str | the string to ellipsize. |
len | the maximum string length. |
Definition at line 7342 of file string.c.
References Qnil, rb_eIndexError, rb_enc_asciicompat, rb_enc_associate(), rb_enc_from_encoding(), rb_enc_get(), rb_enc_mbminlen, rb_enc_nth(), rb_enc_step_back, rb_raise(), rb_str_append(), rb_str_cat(), rb_str_encode(), rb_str_new_with_class(), rb_str_subseq(), rb_usascii_str_new(), RSTRING_LEN, and RSTRING_PTR.
Referenced by bug_str_ellipsize(), rb_hash_fetch_m(), and sys_fail2().
Definition at line 1169 of file string.c.
References Qfalse, Qtrue, and RSTRING_LEN.
Referenced by Init_String(), and sym_empty().
Definition at line 7242 of file string.c.
References argc, i, memcmp(), NIL_P, p, Qfalse, Qtrue, rb_check_string_type(), rb_enc_check(), rb_enc_left_char_head, RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 2284 of file string.c.
References Qfalse, Qtrue, rb_equal(), rb_intern, rb_respond_to(), str_eql(), T_STRING, and TYPE.
Referenced by iconv_create(), init_addrinfo_getaddrinfo(), Init_String(), match_equal(), opt_eq_func(), path_eq(), and rb_str_upto().
Definition at line 585 of file string.c.
References rb_default_external_encoding(), rb_str_conv_enc(), and STR_ENC_GET.
Definition at line 591 of file string.c.
References rb_locale_encoding(), rb_str_conv_enc(), and STR_ENC_GET.
Referenced by curses_addstr(), and window_addstr().
VALUE rb_str_export_to_enc | ( | VALUE | str, |
rb_encoding * | enc | ||
) |
Definition at line 597 of file string.c.
References rb_str_conv_enc(), and STR_ENC_GET.
Referenced by alias(), scalar(), start_document(), start_mapping(), and start_sequence().
Definition at line 7282 of file string.c.
References ENC_CODERANGE_CLEAR, rb_enc_associate(), rb_to_encoding(), and str_modifiable().
Referenced by Init_String().
Definition at line 1266 of file string.c.
References NIL_P, RARRAY_LENINT, RARRAY_PTR, rb_check_array_type(), and rb_str_format().
Referenced by Init_String().
void rb_str_free | ( | VALUE | str | ) |
Definition at line 789 of file string.c.
References RSTRING, STR_EMBED_P, STR_SHARED_P, and xfree().
Referenced by obj_free().
Definition at line 1723 of file string.c.
References OBJ_FREEZE, rb_obj_freeze(), RSTRING, and STR_ASSOC_P.
Referenced by path_freeze(), rb_get_expanded_load_path(), and ruby_init_loadpath_safe().
Definition at line 3988 of file string.c.
References INT2FIX, NUM2LONG(), Qnil, RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 3862 of file string.c.
References str_gsub(), and str_modify_keep_cr().
Referenced by Init_String().
st_index_t rb_str_hash | ( | VALUE | str | ) |
Definition at line 2170 of file string.c.
References ENC_CODERANGE_7BIT, ENCODING_GET, rb_enc_str_coderange(), rb_memhash(), RSTRING_LEN, and RSTRING_PTR.
Referenced by cdhash_hash(), match_hash(), path_hash(), rb_any_hash(), and rb_str_hash_m().
Definition at line 2180 of file string.c.
References len, memcmp(), rb_str_comparable(), RSTRING_LEN, and RSTRING_PTR.
Referenced by cdhash_cmp(), and rb_any_cmp().
Definition at line 2200 of file string.c.
References INT2FIX, and rb_str_hash().
Referenced by Init_String().
Definition at line 6753 of file string.c.
References FALSE, rb_eEncCompatError, rb_enc_asciicompat, rb_enc_get(), rb_enc_name, rb_raise(), and rb_str_to_inum().
Referenced by Init_String().
Definition at line 4260 of file string.c.
References i, Qfalse, Qtrue, rb_str_index(), and StringValue.
Referenced by Init_String().
Definition at line 2433 of file string.c.
References is_broken_string, len, rb_enc_check(), rb_enc_right_char_head, rb_memsearch(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), str_offset(), and str_strlen().
Referenced by rb_str_aref(), rb_str_aset(), rb_str_include(), rb_str_index_m(), and rb_str_partition().
Definition at line 2494 of file string.c.
References LONG2NUM, NIL_P, NUM2LONG(), Qnil, rb_backref_set(), rb_check_string_type(), rb_enc_check(), rb_eTypeError, rb_obj_classname(), rb_raise(), rb_reg_search(), rb_scan_args(), rb_str_index(), rb_str_sublen(), RSTRING_END, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, str_offset(), str_strlen(), sub, T_REGEXP, T_STRING, and TYPE.
Referenced by Init_String().
Definition at line 924 of file string.c.
References rb_scan_args(), and rb_str_replace().
Referenced by Init_String().
Definition at line 3493 of file string.c.
References NUM2LONG(), rb_str_append(), and rb_str_splice().
Referenced by Init_String().
Definition at line 4410 of file string.c.
References buf, CHAR_ESC_LEN, ISPRINT, MBCLEN_CHARFOUND_LEN, MBCLEN_CHARFOUND_P, NULL, OBJ_INFECT, p, rb_default_external_encoding(), rb_default_internal_encoding(), rb_enc_asciicompat, rb_enc_associate(), rb_enc_codepoint, rb_enc_find(), rb_enc_isascii, rb_enc_isprint, rb_enc_mbc_to_codepoint, rb_enc_mbminlen, rb_enc_precise_mbclen(), rb_enc_unicode_p(), rb_str_buf_cat_escaped_char(), rb_str_buf_new(), rb_usascii_encoding(), result, RSTRING_END, RSTRING_PTR, snprintf, str_buf_cat(), str_buf_cat2, STR_ENC_GET, and strlen().
Referenced by gzfile_error_inspect(), Init_String(), match_inspect(), rb_get_path_check(), rb_invalid_str(), and sym_inspect().
Definition at line 6858 of file string.c.
References id, ID2SYM, RB_GC_GUARD, and rb_intern_str().
Referenced by hash2ptr_dispparams(), hash2result(), Init_String(), JSON_parse_string(), rb_to_id(), sym_capitalize(), sym_downcase(), sym_each_i(), sym_step_i(), sym_succ(), sym_swapcase(), and sym_upcase().
Definition at line 7320 of file string.c.
References ENC_CODERANGE_7BIT, Qfalse, Qtrue, and rb_enc_str_coderange().
Referenced by Init_String(), and sym_inspect().
Definition at line 6955 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_AND, ENC_CODERANGE_BROKEN, ENC_CODERANGE_SET, len, LONG_MAX, NIL_P, NUM2LONG(), OBJ_INFECT, p, rb_eArgError, rb_enc_associate(), rb_enc_check(), rb_raise(), rb_scan_args(), rb_str_dup(), rb_str_new5, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), size, STR_ENC_GET, str_offset(), STR_SET_LEN, str_strlen(), and StringValue.
Referenced by rb_str_center(), rb_str_ljust(), and rb_str_rjust().
Definition at line 1137 of file string.c.
References len, LONG2NUM, STR_ENC_GET, and str_strlen().
Referenced by iconv_iconv(), Init_String(), reg_match_pos(), and sym_length().
Definition at line 1756 of file string.c.
References func, rb_ensure(), rb_str_locktmp(), and rb_str_unlocktmp().
Referenced by io_fread(), and io_getpartial().
Definition at line 6522 of file string.c.
References rb_str_dup(), and rb_str_lstrip_bang().
Referenced by Init_String().
Definition at line 6481 of file string.c.
References memmove(), Qnil, rb_enc_codepoint_len(), rb_isspace(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, str_modify_keep_cr(), and STR_SET_LEN.
Referenced by Init_String(), rb_str_lstrip(), and rb_str_strip_bang().
Definition at line 2677 of file string.c.
References rb_eTypeError, rb_funcall(), rb_intern, rb_raise(), rb_reg_match(), T_REGEXP, T_STRING, and TYPE.
Referenced by Init_String(), and sym_match().
Definition at line 2725 of file string.c.
References get_pat(), NIL_P, rb_block_given_p(), rb_eArgError, rb_funcall2(), rb_intern, rb_raise(), rb_yield(), and result.
Referenced by Init_String().
RUBY_FUNC_EXPORTED size_t rb_str_memsize | ( | VALUE | str | ) |
Definition at line 797 of file string.c.
References RSTRING, STR_EMBED_P, and STR_SHARED_P.
Referenced by memsize_of().
void rb_str_modify | ( | VALUE | str | ) |
Definition at line 1319 of file string.c.
References ENC_CODERANGE_CLEAR, str_independent(), and str_make_independent.
Referenced by bug_str_cstr_term(), bug_str_modify(), econv_primitive_convert(), io_setstrbuf(), ossl_ssl_read_internal(), rb_file_expand_path_internal(), rb_str_setbyte(), rb_str_splice_0(), rb_str_sub_bang(), rb_str_vcatf(), rb_string_value_cstr(), setup_narg(), str_buf_cat(), strio_extend(), strio_read(), and strio_ungetbyte().
Definition at line 1327 of file string.c.
References ENC_CODERANGE_CLEAR, rb_eArgError, rb_raise(), REALLOC_N, RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, STR_EMBED_P, str_independent(), str_make_independent_expand(), and STR_UNSET_NOCAPA.
Referenced by bug_str_modify_expand(), rb_str_append(), and rb_str_cat().
Definition at line 410 of file string.c.
References rb_cString, and str_new().
Referenced by addrinfo_inspect_sockaddr(), addrinfo_mdump(), addrinfo_to_sockaddr(), appendline(), argf_getpartial(), asn1str_to_str(), BigDecimal_dump(), BigDecimal_inspect(), BigDecimal_split(), BigDecimal_to_f(), BigDecimal_to_s(), bsock_getpeername(), bsock_getsockname(), bsock_getsockopt(), bubblebabble_str_new(), check_pipe_command(), date_strftime_internal(), date_zone_to_diff(), decode_bstr(), decode_eoc(), dir_s_home(), econv_convert(), econv_description(), econv_finish(), econv_primitive_errinfo(), econv_putback(), extract_user_token(), gzfile_getc(), gzfile_read(), gzfile_read_all(), gzfile_read_header(), gzfile_readpartial(), gzreader_gets(), hexencode_str_new(), iconv_convert(), iconv_create(), iconv_s_conv(), infected_str_new(), inspect1(), inspect2(), int_chr(), int_ossl_asn1_decode0_prim(), io_getc(), io_setstrbuf(), io_shift_cbuf(), join_der(), JSON_parse_float(), JSON_parse_integer(), lib_conv_listelement(), lib_fromUTF8_core(), lib_merge_tklist(), lib_toUTF8_core(), lib_UTF_backslash_core(), load_file_internal(), make_econv_exception(), match_to_s(), mktime_r(), name_to_backref_number(), ossl_asn1cons_to_der(), ossl_asn1data_to_der(), ossl_asn1eoc_initialize(), ossl_bn_to_s(), ossl_cipher_final(), ossl_cipher_update(), ossl_dh_compute_key(), ossl_dh_to_der(), ossl_digest_finish(), ossl_dsa_sign(), ossl_dsa_to_der(), ossl_hmac_s_digest(), ossl_make_error(), ossl_membio2str0(), ossl_pkcs12_to_der(), ossl_pkcs7_to_der(), ossl_pkey_sign(), ossl_rand_bytes(), ossl_rand_pseudo_bytes(), ossl_rsa_private_decrypt(), ossl_rsa_private_encrypt(), ossl_rsa_public_decrypt(), ossl_rsa_public_encrypt(), ossl_rsa_to_der(), ossl_spki_get_challenge(), ossl_spki_print(), ossl_spki_to_der(), ossl_ssl_read_internal(), ossl_ssl_session_to_der(), ossl_ssl_session_to_pem(), ossl_ssl_session_to_text(), ossl_sslctx_session_get_cb(), ossl_sslctx_set_ciphers(), ossl_str_new(), ossl_x509_to_der(), ossl_x509attr_get_value(), ossl_x509attr_to_der(), ossl_x509crl_get_signature_algorithm(), ossl_x509crl_to_der(), ossl_x509crl_to_pem(), ossl_x509crl_to_text(), ossl_x509ext_to_der(), ossl_x509name_to_a(), ossl_x509name_to_der(), ossl_x509req_get_signature_algorithm(), ossl_x509req_to_der(), ossl_x509req_to_pem(), ossl_x509req_to_text(), pack_pack(), pack_unpack(), parse(), proc_options(), r_bytes0(), rb_compile_cstr(), rb_digest_base_finish(), rb_enc_str_new(), rb_exc_new(), rb_f_backquote(), rb_file_dirname(), rb_file_join(), rb_file_s_basename(), rb_file_s_extname(), rb_gdbm_fetch(), rb_gdbm_firstkey(), rb_gdbm_nextkey(), rb_inflate_inflate(), rb_io_getline_fast(), rb_io_putc(), rb_io_ungetbyte(), rb_iseq_disasm(), rb_iseq_disasm_insn(), rb_nkf_convert(), rb_parser_compile_cstr(), rb_path_check(), rb_random_bytes(), rb_reg_compile(), rb_reg_quote(), rb_str_derive(), rb_str_new_cstr(), rb_str_plus(), rb_str_slice_bang(), rb_syck_output_handler(), rb_usascii_str_new(), rb_write_error2(), reg_named_captures_iter(), reg_names_iter(), RUBY_ALIAS_FUNCTION(), ruby_init_loadpath_safe(), s3e(), set_file_encoding(), set_option_encoding_once(), sock_s_gethostbyaddr(), sock_s_pack_sockaddr_in(), sock_sockaddr(), sockopt_s_bool(), sockopt_s_int(), sockopt_s_linger(), str_new(), strftimev(), strio_getline(), strio_read(), syck_genericresolver_node_import(), syck_resolver_node_import(), time_mdump(), time_strftime(), tkstr_to_str(), writer(), yaml_org_handler(), zstream_detach_buffer(), zstream_detach_input(), zstream_expand_buffer(), zstream_expand_buffer_into(), and zstream_sync().
Definition at line 432 of file string.c.
References rb_eArgError, rb_raise(), rb_str_new(), and strlen().
Referenced by addrinfo_mdump(), curses_keyname(), decorate_convpath(), dir_inspect(), econv_convpath(), finish_writeconv(), hist_to_s(), Init_readline(), load_file_internal(), ossl_make_error(), prep_io(), process_options(), pty_getpty(), pty_open(), random_rand(), rb_econv_open_exc(), rb_file_open(), rb_io_inspect(), rb_io_s_binread(), rb_parser_dump_tree(), rb_path2class(), ruby_init_loadpath_safe(), search_convpath_i(), sys_fail2(), and warn_deprecated().
Definition at line 672 of file string.c.
References assert, ENCODING_GET, FL_SET, FL_UNSET, OBJ_FREEZE, OBJ_FROZEN, OBJ_INFECT, OBJ_TAINTED, rb_enc_cr_str_exact_copy(), rb_obj_class(), RBASIC, RSTRING, RSTRING_LEN, RSTRING_PTR, STR_ASSOC, STR_ASSOC_P, STR_EMBED_P, str_new(), str_new3(), and STR_SHARED_P.
Referenced by rb_econv_prepare_options(), rb_file_open_generic(), rb_io_reopen(), rb_set_class_path_string(), rb_str_subseq(), and str_replace_shared().
Definition at line 636 of file string.c.
References OBJ_INFECT, rb_obj_class(), and str_new3().
Referenced by rb_file_s_basename(), and rb_str_subseq().
Definition at line 6779 of file string.c.
References FALSE, rb_eEncCompatError, rb_enc_asciicompat, rb_enc_get(), rb_enc_name, rb_raise(), and rb_str_to_inum().
Referenced by Init_String().
Definition at line 1551 of file string.c.
References RSTRING_END, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, and str_offset().
Referenced by reg_match_pos().
Definition at line 6878 of file string.c.
References rb_enc_codepoint, RSTRING_END, RSTRING_PTR, STR_ENC_GET, and UINT2NUM().
Referenced by Init_String().
Definition at line 7120 of file string.c.
References FALSE, INT2FIX, NIL_P, rb_ary_new3(), rb_check_string_type(), rb_eTypeError, rb_obj_classname(), rb_raise(), rb_reg_search(), rb_str_index(), rb_str_subpat(), rb_str_subseq(), RSTRING_LEN, T_REGEXP, TRUE, and TYPE.
Referenced by Init_String().
Definition at line 1187 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_AND, ENCODING_CODERANGE_SET, OBJ_TAINT, OBJ_TAINTED, rb_enc_check(), rb_enc_to_index, rb_str_new(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by iconv_create(), and Init_String().
Definition at line 2161 of file string.c.
References rb_str_update(), and StringValue.
Referenced by Init_String().
Definition at line 3931 of file string.c.
References str_discard(), str_modifiable(), str_replace(), and StringValue.
Referenced by Init_String(), and rb_str_init().
Definition at line 1779 of file string.c.
References ENC_CODERANGE_CLEAR, len, MEMCPY, rb_eArgError, rb_raise(), REALLOC_N, RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, STR_EMBED_P, str_independent(), str_make_independent_expand(), STR_NOCAPA_P, STR_SET_EMBED, STR_SET_EMBED_LEN, STR_SET_NOEMBED, and xfree().
Referenced by append_fspath(), appendline(), argf_getpartial(), argf_read(), BigDecimal_dump(), BigDecimal_inspect(), BigDecimal_split(), BigDecimal_to_s(), copy_stream_body(), copy_stream_fallback_body(), econv_primitive_convert(), flo_to_s(), get_user_from_path(), gzfile_error_inspect(), gzfile_readpartial(), iconv_create(), io_getpartial(), io_read(), io_setstrbuf(), lib_conv_listelement(), literal_concat0(), marshal_dump(), moreswitches(), ossl_cipher_update(), ossl_digest_finish(), ossl_ssl_read_internal(), rb_big2str0(), rb_econv_substr_append(), rb_enc_vsprintf(), rb_feature_p(), rb_file_expand_path_internal(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), rb_home_dir(), rb_io_getline_fast(), rb_io_sysread(), rb_iseq_disasm(), rb_nkf_putchar(), rb_reg_quote(), rb_str_concat(), rb_str_format(), rb_str_vcatf(), read_all(), realpath_rec(), RUBY_ALIAS_FUNCTION(), ruby_init_loadpath_safe(), ruby_setenv(), set_file_encoding(), setup_narg(), str_transcoding_resize(), strio_extend(), strio_init(), strio_read(), strio_truncate(), strio_ungetbyte(), strio_ungetc(), sym_inspect(), VpAlloc(), w_nbyte(), yyparse(), zstream_append_buffer(), zstream_detach_buffer(), zstream_discard_input(), zstream_expand_buffer(), and zstream_expand_buffer_into().
Definition at line 911 of file string.c.
References rb_cString, str_alloc(), and str_replace().
Referenced by gzfile_raise(), gzfile_reader_get_unused(), and obj_resurrect().
Definition at line 4157 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_UNKNOWN, ENC_CODERANGE_VALID, OBJ_INFECT, p, rb_enc_cr_str_copy_for_substr(), rb_enc_fast_mbclen(), rb_enc_mbclen(), rb_str_dup(), rb_str_new5, RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, and STR_SET_LEN.
Referenced by Init_String(), and rb_str_reverse_bang().
Definition at line 4221 of file string.c.
References rb_str_reverse(), rb_str_shared_replace(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), and str_modify_keep_cr().
Referenced by Init_String().
Definition at line 2549 of file string.c.
References is_broken_string, len, memcmp(), rb_enc_check(), rb_enc_prev_char, RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), str_nth(), and str_strlen().
Referenced by rb_str_rindex_m(), and rb_str_rpartition().
Definition at line 2606 of file string.c.
References len, LONG2NUM, NIL_P, NUM2LONG(), Qnil, rb_backref_set(), rb_check_string_type(), rb_eTypeError, rb_obj_classname(), rb_raise(), rb_reg_search(), rb_scan_args(), rb_str_rindex(), rb_str_sublen(), RREGEXP, RREGEXP_SRC_LEN, RSTRING_END, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, str_offset(), str_strlen(), sub, T_REGEXP, T_STRING, and TYPE.
Referenced by Init_String().
Definition at line 7170 of file string.c.
References FALSE, NIL_P, rb_ary_new3(), rb_backref_get(), rb_check_string_type(), rb_eTypeError, rb_obj_classname(), rb_raise(), rb_reg_nth_match(), rb_reg_search(), rb_str_rindex(), rb_str_sublen(), rb_str_substr(), RSTRING_LEN, STR_ENC_GET, str_strlen(), T_REGEXP, TRUE, and TYPE.
Referenced by Init_String().
Definition at line 6592 of file string.c.
References rb_str_dup(), and rb_str_rstrip_bang().
Referenced by Init_String().
Definition at line 6543 of file string.c.
References ascii_isspace, len, NULL, Qnil, rb_enc_codepoint, rb_enc_prev_char, rb_isspace(), rb_str_check_dummy_enc(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, str_modify_keep_cr(), and STR_SET_LEN.
Referenced by Init_String(), rb_str_rstrip(), and rb_str_strip_bang().
Definition at line 1468 of file string.c.
References rb_check_string_type().
Referenced by Init_String().
Definition at line 6707 of file string.c.
References get_pat(), last, NIL_P, rb_ary_new(), rb_ary_push(), rb_block_given_p(), rb_reg_search(), rb_yield(), result, RSTRING_LEN, RSTRING_PTR, scan_once(), and str_mod_check().
Referenced by Init_String().
Definition at line 1763 of file string.c.
References len, rb_bug(), rb_eRuntimeError, rb_raise(), rb_str_capacity(), RSTRING_PTR, str_modifiable(), STR_SET_LEN, and STR_SHARED_P.
Referenced by RUBY_ALIAS_FUNCTION().
Definition at line 4007 of file string.c.
References NUM2INT, NUM2LONG(), rb_eIndexError, rb_raise(), rb_str_modify(), RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 7265 of file string.c.
References NIL_P, rb_eTypeError, rb_id2name(), rb_raise(), T_STRING, and TYPE.
Referenced by Init_IO().
Definition at line 816 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_SET, FL_SET, OBJ_INFECT, rb_enc_associate(), RBASIC, RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, RSTRING_PTR, str_discard(), STR_ENC_GET, STR_NOCAPA, STR_NOCAPA_P, STR_SET_EMBED, STR_SET_EMBED_LEN, STR_SET_NOEMBED, and STR_UNSET_NOCAPA.
Referenced by rb_str_reverse_bang(), rb_str_succ_bang(), str_encode_bang(), and str_gsub().
Definition at line 3528 of file string.c.
References argc, buf, i, NIL_P, rb_eArgError, rb_raise(), rb_str_aref_m(), rb_str_aset_m(), rb_str_new(), result, and str_modify_keep_cr().
Referenced by Init_String().
Definition at line 3307 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_AND, ENC_CODERANGE_BROKEN, ENC_CODERANGE_SET, p, rb_eIndexError, rb_enc_associate(), rb_enc_check(), rb_raise(), rb_str_splice_0(), RSTRING_END, RSTRING_PTR, single_byte_optimizable(), str_modify_keep_cr(), str_nth(), str_strlen(), and StringValue.
Referenced by rb_str_aset(), rb_str_aset_m(), rb_str_insert(), and rb_str_update().
Definition at line 3274 of file string.c.
References memmove(), MEMZERO, OBJ_INFECT, rb_str_drop_bytes(), rb_str_modify(), RESIZE_CAPA, RSTRING_LEN, RSTRING_PTR, and STR_SET_LEN.
Referenced by rb_str_splice(), and rb_str_subpat_set().
Definition at line 5991 of file string.c.
References rb_str_new2, rb_str_split_m(), and StringValue.
Referenced by syck_const_find(), and syck_resolver_transfer().
Definition at line 5776 of file string.c.
References ascii_isspace, BEG, END, get_pat(), i, is_ascii_string, is_broken_string, len, NIL_P, NUM2INT, re_registers::num_regs, Qnil, RARRAY_LEN, RARRAY_PTR, rb_ary_new(), rb_ary_new2(), rb_ary_new3(), rb_ary_pop(), rb_ary_push(), rb_backref_get(), rb_eArgError, rb_enc_ascget(), rb_enc_asciicompat, rb_enc_check(), rb_enc_codepoint_len(), rb_enc_fast_mbclen(), rb_enc_name, rb_enc_right_char_head, rb_fs, rb_isspace(), rb_memsearch(), rb_raise(), rb_reg_regcomp(), rb_reg_search(), rb_scan_args(), rb_str_subseq(), result, RMATCH_REGS, RSTRING_END, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, T_STRING, and TYPE.
Referenced by Init_String(), and rb_str_split().
Definition at line 5590 of file string.c.
References rb_str_dup(), and rb_str_squeeze_bang().
Referenced by Init_String().
Definition at line 5500 of file string.c.
References argc, i, Qnil, rb_enc_asciicompat, rb_enc_check(), rb_enc_codepoint_len(), rb_enc_mbcput, RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, str_modify_keep_cr(), STR_SET_LEN, StringValue, tr_find(), tr_setup_table(), and TR_TABLE_SIZE.
Referenced by Init_String(), and rb_str_squeeze().
Definition at line 7219 of file string.c.
References argc, i, memcmp(), NIL_P, Qfalse, Qtrue, rb_check_string_type(), rb_enc_check(), RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 6630 of file string.c.
References rb_str_dup(), and rb_str_strip_bang().
Referenced by Init_String().
Definition at line 6609 of file string.c.
References NIL_P, Qnil, rb_str_lstrip_bang(), and rb_str_rstrip_bang().
Referenced by Init_String(), and rb_str_strip().
Definition at line 1123 of file string.c.
References STR_ENC_GET, and str_strlen().
Definition at line 3729 of file string.c.
References rb_str_dup(), and rb_str_sub_bang().
Referenced by Init_String().
Definition at line 3588 of file string.c.
References BEG, coderange_scan(), ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, ENC_CODERANGE_SET, ENC_CODERANGE_UNKNOWN, ENC_CODERANGE_VALID, END, get_pat(), hash(), len, match(), memmove(), NIL_P, OBJ_TAINT, OBJ_TAINTED, OBJ_UNTRUST, OBJ_UNTRUSTED, p, Qnil, rb_backref_get(), rb_block_given_p(), rb_check_convert_type(), rb_check_frozen, rb_eArgError, rb_eEncCompatError, rb_enc_associate(), rb_enc_compatible(), rb_enc_name, rb_hash_aref(), rb_obj_as_string(), rb_raise(), rb_reg_nth_match(), rb_reg_regsub(), rb_reg_search(), rb_str_modify(), rb_str_subseq(), rb_yield(), RESIZE_CAPA, RMATCH_REGS, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, str_mod_check(), str_modifiable(), STR_SET_LEN, StringValue, and T_HASH.
Referenced by Init_String(), and rb_str_sub().
Definition at line 1598 of file string.c.
References ENC_CODERANGE, enc_strlen(), RSTRING_PTR, single_byte_optimizable(), and STR_ENC_GET.
Referenced by rb_reg_match(), rb_reg_match2(), rb_str_aset(), rb_str_index_m(), rb_str_rindex_m(), and rb_str_rpartition().
Definition at line 3125 of file string.c.
References match(), Qnil, rb_backref_get(), rb_reg_backref_number(), rb_reg_nth_match(), and rb_reg_search().
Referenced by rb_str_aref(), rb_str_aref_m(), and rb_str_partition().
Definition at line 3356 of file string.c.
References BEG, END, len, match(), re_registers::num_regs, rb_backref_get(), rb_eIndexError, rb_enc_associate(), rb_enc_check(), rb_raise(), rb_reg_backref_number(), rb_reg_search(), rb_str_splice_0(), RMATCH_REGS, and StringValue.
Referenced by rb_str_aset(), and rb_str_aset_m().
Definition at line 1609 of file string.c.
References OBJ_INFECT, rb_enc_cr_str_copy_for_substr(), rb_str_drop_bytes(), rb_str_new5, rb_str_new_frozen(), rb_str_new_shared(), RSTRING_EMBED_LEN_MAX, RSTRING_LEN, and RSTRING_PTR.
Referenced by check_dirname(), match_array(), path_sub_ext(), rb_file_s_extname(), rb_realpath_internal(), rb_reg_match_post(), rb_reg_match_pre(), rb_reg_nth_match(), rb_str_derive(), rb_str_each_char(), rb_str_ellipsize(), rb_str_partition(), rb_str_split_m(), rb_str_sub_bang(), realpath_rec(), search_required(), str_gsub(), strip_glibc_option(), and zstream_shift_buffer().
Definition at line 1629 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_VALID, len, OBJ_INFECT, p, Qnil, rb_enc_cr_str_copy_for_substr(), rb_enc_mbmaxlen, rb_enc_mbminlen, rb_enc_prev_char, rb_obj_class(), rb_str_new4, rb_str_new5, rb_utf8_encoding(), RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, str_new3(), str_nth_len(), str_offset(), str_strlen(), and sub.
Referenced by iconv_fail(), rb_io_putc(), rb_str_aref(), rb_str_aref_m(), rb_str_chr(), and rb_str_rpartition().
Definition at line 2905 of file string.c.
References enc_succ_alnum_char(), enc_succ_char(), ISALPHA, ISDIGIT, MEMCPY, memmove(), NEIGHBOR_FOUND, NEIGHBOR_NOT_CHAR, NEIGHBOR_WRAPPED, OBJ_INFECT, ONIGENC_CODE_TO_MBC_MAXLEN, rb_enc_asciicompat, rb_enc_cr_str_copy_for_substr(), rb_enc_precise_mbclen(), rb_enc_prev_char, rb_enc_str_coderange(), rb_str_new5, RESIZE_CAPA, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, and STR_SET_LEN.
Referenced by Init_String(), rb_str_succ_bang(), and sym_succ().
Definition at line 2988 of file string.c.
References rb_str_shared_replace(), and rb_str_succ().
Referenced by Init_String().
Definition at line 6897 of file string.c.
References CHAR_BIT, FIXNUM_MAX, INT2FIX, len, long, LONG2FIX, mod, NUM2INT, p, rb_funcall(), rb_intern, rb_scan_args(), RSTRING_LEN, RSTRING_PTR, and str_mod_check().
Referenced by Init_String().
Definition at line 4962 of file string.c.
References rb_str_dup(), and rb_str_swapcase_bang().
Referenced by Init_String(), and sym_swapcase().
Definition at line 4917 of file string.c.
References Qnil, rb_enc_codepoint_len(), rb_enc_islower, rb_enc_isupper, rb_enc_mbcput, rb_enc_tolower(), rb_enc_toupper(), rb_str_check_dummy_enc(), RSTRING_END, RSTRING_PTR, STR_ENC_GET, and str_modify_keep_cr().
Referenced by Init_String(), and rb_str_swapcase().
Definition at line 1218 of file string.c.
References len, LONG_MAX, NUM2LONG(), OBJ_INFECT, rb_eArgError, rb_enc_cr_str_copy_for_substr(), rb_raise(), rb_str_new5, RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_String().
Definition at line 4327 of file string.c.
References DBL2NUM, FALSE, and rb_str_to_dbl().
Referenced by Init_String().
Definition at line 4294 of file string.c.
References FALSE, NUM2INT, rb_eArgError, rb_raise(), rb_scan_args(), and rb_str_to_inum().
Referenced by Init_String().
Definition at line 4342 of file string.c.
References rb_cString, rb_obj_class(), and str_duplicate().
Referenced by Init_String().
Definition at line 808 of file string.c.
References rb_convert_type(), and T_STRING.
Referenced by make_struct(), rb_gzfile_set_comment(), rb_gzfile_set_orig_name(), and rb_string_value().
Definition at line 5306 of file string.c.
References rb_str_dup(), and tr_trans().
Referenced by Init_String().
Definition at line 5627 of file string.c.
References rb_str_dup(), and tr_trans().
Referenced by Init_String().
Definition at line 1746 of file string.c.
References FL_TEST, FL_UNSET, rb_eRuntimeError, rb_raise(), and STR_TMPLOCK.
Referenced by rb_io_sysread(), rb_str_locktmp_ensure(), and readline_readline().
Definition at line 4745 of file string.c.
References rb_str_dup(), and rb_str_upcase_bang().
Referenced by Init_String(), and sym_upcase().
Definition at line 4680 of file string.c.
References Qnil, rb_enc_asciicompat, rb_enc_codepoint_len(), rb_enc_isascii, rb_enc_islower, rb_enc_mbcput, rb_enc_toupper(), rb_str_check_dummy_enc(), RSTRING_END, RSTRING_PTR, single_byte_optimizable(), STR_ENC_GET, and str_modify_keep_cr().
Referenced by Init_String(), and rb_str_upcase().
Definition at line 3350 of file string.c.
References rb_str_splice().
Referenced by eval_string_with_cref(), rb_str_prepend(), and strio_ungetc().
Definition at line 3029 of file string.c.
References args, CONST_ID, FALSE, FIX2LONG, FIXNUM_P, INT2FIX, is_ascii_string, ISDIGIT, NIL_P, no_digits, numberof, Qnil, rb_enc_check(), rb_enc_sprintf(), rb_enc_str_new(), rb_funcall(), rb_intern, rb_long2int, rb_obj_freeze(), rb_scan_args(), rb_str_cmp(), rb_str_dup(), rb_str_equal(), rb_str_format(), rb_str_to_inum(), rb_usascii_encoding(), rb_usascii_str_new_cstr(), rb_yield(), RETURN_ENUMERATOR, RSTRING_END, RSTRING_LEN, RSTRING_PTR, RTEST, and StringValue.
Referenced by Init_String().
Definition at line 7302 of file string.c.
References ENC_CODERANGE_BROKEN, Qfalse, Qtrue, and rb_enc_str_coderange().
Referenced by Init_String().
Definition at line 1414 of file string.c.
References rb_str_to_str(), T_STRING, and TYPE.
Referenced by rb_string_value_cstr(), and rb_string_value_ptr().
char* rb_string_value_cstr | ( | volatile VALUE * | ptr | ) |
Definition at line 1432 of file string.c.
References rb_eArgError, rb_raise(), rb_str_modify(), rb_string_value(), RSTRING_LEN, and RSTRING_PTR.
char* rb_string_value_ptr | ( | volatile VALUE * | ptr | ) |
Definition at line 1425 of file string.c.
References rb_string_value(), and RSTRING_PTR.
Definition at line 7498 of file string.c.
References rb_cString, rb_id2str(), str_new3(), and SYM2ID.
Referenced by constant_arg(), ev_on_event(), fev_off_event(), fole_respond_to(), get_eval_string_core(), hash2named_arg(), Init_String(), ole_invoke(), range_each(), range_step(), reg_operand(), sym_aref(), sym_casecmp(), sym_cmp(), sym_match(), and sym_succ().
Definition at line 464 of file string.c.
References OBJ_TAINT, and rb_str_new2.
Referenced by addrinfo_firstonly_new(), addrinfo_list_new(), and init_addrinfo_getaddrinfo().
Definition at line 7740 of file string.c.
References NIL_P, Qnil, rb_check_string_type(), rb_eTypeError, rb_inspect(), rb_raise(), rb_str_intern(), RSTRING_PTR, SYM2ID, T_STRING, T_SYMBOL, and TYPE.
Referenced by bug_funcall(), enum_inject(), enumerator_init(), fole_missing(), make_struct(), num_sadded(), obj_respond_to(), ole_search_handler_method(), rb_f_trace_var(), rb_f_untrace_var(), rb_mod_alias_method(), rb_mod_attr(), rb_mod_attr_accessor(), rb_mod_attr_reader(), rb_mod_attr_writer(), rb_mod_autoload(), rb_mod_autoload_p(), rb_mod_const_defined(), rb_mod_const_get(), rb_mod_const_missing(), rb_mod_const_set(), rb_mod_cvar_defined(), rb_mod_cvar_get(), rb_mod_cvar_set(), rb_mod_define_method(), rb_mod_instance_method(), rb_mod_method_defined(), rb_mod_modfunc(), rb_mod_private_method_defined(), rb_mod_protected_method_defined(), rb_mod_public_instance_method(), rb_mod_public_method_defined(), rb_mod_remove_const(), rb_mod_remove_cvar(), rb_mod_remove_method(), rb_mod_undef_method(), rb_obj_ivar_defined(), rb_obj_ivar_get(), rb_obj_ivar_set(), rb_obj_method(), rb_obj_public_method(), rb_obj_remove_instance_variable(), rb_struct_aref(), rb_struct_aset(), rb_struct_s_def(), rb_thread_aref(), rb_thread_aset(), rb_thread_key_p(), send_internal(), set_const_visibility(), set_method_visibility(), syck_const_find(), and vm_call_method().
Definition at line 416 of file string.c.
References ENC_CODERANGE_7BIT, ENCODING_CODERANGE_SET, rb_str_new(), and rb_usascii_encindex().
Referenced by date__strptime(), flo_to_s(), Init_golf(), Init_prelude(), int_chr(), nil_to_s(), rb_ary_join(), rb_big2str0(), rb_id2str(), rb_io_getline_1(), rb_str_ellipsize(), and strftimev().
RUBY_ALIAS_FUNCTION | ( | rb_str_new2(const char *ptr) | , |
rb_str_new_cstr | , | ||
(ptr) | |||
) |
Definition at line 440 of file string.c.
References ENC_CODERANGE_7BIT, ENCODING_CODERANGE_SET, rb_str_new2, and rb_usascii_encindex().
RUBY_ALIAS_FUNCTION | ( | rb_usascii_str_new2(const char *ptr) | , |
rb_usascii_str_new_cstr | , | ||
(ptr) | |||
) |
Definition at line 451 of file string.c.
References OBJ_TAINT, and rb_str_new().
RUBY_ALIAS_FUNCTION | ( | rb_tainted_str_new2(const char *ptr) | , |
rb_tainted_str_new_cstr | , | ||
(ptr) | |||
) |
Definition at line 472 of file string.c.
References dp, econv_destination_buffer_full, econv_finished, ENC_CODERANGE, ENC_CODERANGE_7BIT, len, OnigEncodingTypeST::name, rb_ascii8bit_encoding(), rb_econv_close(), rb_econv_convert(), rb_econv_open_opts(), rb_enc_asciicompat, rb_enc_associate(), rb_str_dup(), rb_str_new(), rb_str_resize(), rb_str_set_len(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, and STR_ENC_GET.
RUBY_ALIAS_FUNCTION | ( | rb_str_new3(VALUE str) | , |
rb_str_new_shared | , | ||
(str) | |||
) |
Definition at line 644 of file string.c.
References assert, ELTS_SHARED, FL_SET, OBJ_FROZEN, OBJ_INFECT, rb_enc_cr_str_exact_copy(), RSTRING, RSTRING_LEN, RSTRING_PTR, str_alloc(), STR_SET_NOEMBED, and STR_SHARED_P.
RUBY_ALIAS_FUNCTION | ( | rb_str_new4(VALUE orig) | , |
rb_str_new_frozen | , | ||
(orig) | |||
) |
Definition at line 711 of file string.c.
References rb_obj_class(), and str_new().
RUBY_ALIAS_FUNCTION | ( | rb_str_new5(VALUE obj, const char *ptr, long len) | , |
rb_str_new_with_class | , | ||
(obj, ptr, len) | |||
) |
Definition at line 720 of file string.c.
References OBJ_INFECT, rb_enc_copy(), rb_str_new5, and v.
RUBY_ALIAS_FUNCTION | ( | rb_str_buf_new2(const char *ptr) | , |
rb_str_buf_new_cstr | , | ||
(ptr) | |||
) |
RUBY_ALIAS_FUNCTION | ( | rb_str_dup_frozen(VALUE str) | , |
rb_str_new_frozen | , | ||
(str) | |||
) |
Definition at line 1732 of file string.c.
References FL_SET, FL_TEST, rb_eRuntimeError, rb_raise(), and STR_TMPLOCK.
Definition at line 6638 of file string.c.
References BEG, END, i, match(), re_registers::num_regs, Qnil, rb_ary_new2(), rb_ary_push(), rb_backref_get(), rb_enc_fast_mbclen(), rb_reg_nth_match(), rb_reg_search(), result, RMATCH_REGS, RSTRING_END, RSTRING_LEN, RSTRING_PTR, and STR_ENC_GET.
Referenced by rb_str_scan().
Definition at line 144 of file string.c.
Referenced by coderange_scan(), enc_strlen(), rb_enc_cr_str_copy_for_substr(), rb_enc_strlen_cr(), rb_str_coderange_scan_restartable(), and str_nth_len().
|
inlinestatic |
Definition at line 124 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_7BIT, rb_enc_mbmaxlen, and STR_ENC_GET.
Referenced by rb_str_casecmp(), rb_str_downcase_bang(), rb_str_each_codepoint(), rb_str_index(), rb_str_index_m(), rb_str_justify(), rb_str_offset(), rb_str_reverse(), rb_str_reverse_bang(), rb_str_rindex(), rb_str_rindex_m(), rb_str_rstrip_bang(), rb_str_splice(), rb_str_squeeze_bang(), rb_str_sublen(), rb_str_substr(), rb_str_upcase_bang(), str_strlen(), and tr_trans().
Definition at line 371 of file string.c.
References NEWOBJ, OBJSETUP, and T_STRING.
Referenced by Init_String(), rb_str_buf_new(), rb_str_resurrect(), RUBY_ALIAS_FUNCTION(), str_duplicate(), str_new(), and str_new_shared().
Definition at line 1827 of file string.c.
References FL_UNSET, len, LONG_MAX, rb_eArgError, rb_raise(), rb_str_modify(), RESIZE_CAPA, RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_END, RSTRING_LEN, RSTRING_PTR, STR_ASSOC, STR_ASSOC_P, STR_EMBED_P, and STR_SET_LEN.
Referenced by rb_enc_cr_str_buf_cat(), rb_str_buf_cat(), and rb_str_inspect().
Definition at line 4080 of file string.c.
References re_registers::beg, FIX2LONG, NIL_P, NUM2LONG(), Qfalse, Qnil, rb_range_beg_len(), RSTRING_LEN, str_byte_substr(), T_FIXNUM, and TYPE.
Referenced by rb_str_byteslice().
Definition at line 4025 of file string.c.
References re_registers::beg, ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_UNKNOWN, ENC_CODERANGE_VALID, len, OBJ_INFECT, p, Qnil, rb_enc_asciicompat, rb_obj_class(), rb_str_new4, rb_str_new5, RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, RSTRING_PTR, str_enc_copy(), STR_ENC_GET, and str_new3().
Referenced by rb_str_byteslice(), and str_byte_aref().
|
inlinestatic |
Definition at line 1362 of file string.c.
References RSTRING, RSTRING_PTR, STR_EMBED_P, str_modifiable(), STR_SHARED_P, and xfree().
Referenced by rb_str_clear(), rb_str_replace(), and rb_str_shared_replace().
Definition at line 897 of file string.c.
References str_alloc(), and str_replace().
Referenced by rb_str_dup(), and rb_str_to_s().
Definition at line 282 of file string.c.
References ENCODING_GET, and rb_enc_set_index().
Referenced by rb_enc_cr_str_copy_for_substr(), rb_enc_cr_str_exact_copy(), and str_byte_substr().
Definition at line 2261 of file string.c.
References memcmp(), Qfalse, Qtrue, rb_str_comparable(), RSTRING_LEN, and RSTRING_PTR.
Referenced by rb_str_eql(), and rb_str_equal().
Definition at line 3737 of file string.c.
References BEG, re_registers::beg, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, END, get_pat(), hash(), last, len, match(), NIL_P, OBJ_INFECT, OBJ_TAINT, OBJ_TAINTED, Qnil, rb_backref_get(), rb_check_convert_type(), rb_eArgError, rb_enc_asciicompat, rb_enc_associate(), rb_enc_fast_mbclen(), rb_enc_str_buf_cat(), rb_eRuntimeError, rb_hash_aref(), rb_obj_as_string(), rb_obj_class(), rb_raise(), rb_reg_nth_match(), rb_reg_regsub(), rb_reg_search(), rb_str_buf_append(), rb_str_buf_new(), rb_str_dup(), rb_str_shared_replace(), rb_str_subseq(), rb_yield(), RBASIC, RETURN_ENUMERATOR, RMATCH_REGS, RSTRING_END, RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, str_mod_check(), StringValue, and T_HASH.
Referenced by rb_str_gsub(), and rb_str_gsub_bang().
|
inlinestatic |
Definition at line 1288 of file string.c.
References STR_EMBED_P, str_modifiable(), and STR_SHARED_P.
Referenced by rb_str_modify(), rb_str_modify_expand(), rb_str_resize(), and str_modify_keep_cr().
Definition at line 1297 of file string.c.
References ALLOC_N, len, RSTRING, RSTRING_LEN, RSTRING_PTR, STR_SET_NOEMBED, and STR_UNSET_NOCAPA.
Referenced by rb_str_modify_expand(), and rb_str_resize().
Definition at line 349 of file string.c.
References rb_eRuntimeError, rb_raise(), RSTRING_LEN, and RSTRING_PTR.
Referenced by rb_str_each_line(), rb_str_scan(), rb_str_sub_bang(), rb_str_sum(), and str_gsub().
|
inlinestatic |
Definition at line 1277 of file string.c.
References FL_TEST, OBJ_UNTRUSTED, rb_check_frozen, rb_eRuntimeError, rb_eSecurityError, rb_raise(), rb_safe_level, and STR_TMPLOCK.
Referenced by rb_str_drop_bytes(), rb_str_force_encoding(), rb_str_replace(), rb_str_set_len(), rb_str_sub_bang(), str_discard(), and str_independent().
|
static |
Definition at line 1352 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_BROKEN, ENC_CODERANGE_CLEAR, str_independent(), and str_make_independent.
Referenced by rb_str_capitalize_bang(), rb_str_chomp_bang(), rb_str_chop_bang(), rb_str_delete_bang(), rb_str_downcase_bang(), rb_str_gsub_bang(), rb_str_lstrip_bang(), rb_str_reverse_bang(), rb_str_rstrip_bang(), rb_str_slice_bang(), rb_str_splice(), rb_str_squeeze_bang(), rb_str_swapcase_bang(), rb_str_upcase_bang(), and tr_trans().
Definition at line 384 of file string.c.
References ALLOC_N, ENC_CODERANGE_7BIT, ENC_CODERANGE_SET, len, rb_eArgError, rb_raise(), RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_PTR, str_alloc(), STR_SET_LEN, and STR_SET_NOEMBED.
Referenced by rb_str_new(), rb_str_new_frozen(), and RUBY_ALIAS_FUNCTION().
Definition at line 630 of file string.c.
References str_new_shared().
Referenced by rb_str_new_frozen(), rb_str_new_shared(), rb_str_substr(), rb_sym_to_s(), and str_byte_substr().
Definition at line 624 of file string.c.
References str_alloc(), and str_replace_shared().
Referenced by str_new3().
|
static |
Definition at line 1529 of file string.c.
References p, and str_nth_len().
Referenced by rb_str_rindex(), rb_str_splice(), and str_offset().
|
static |
Definition at line 1474 of file string.c.
References ISASCII, p, rb_enc_asciicompat, rb_enc_mbclen(), rb_enc_mbmaxlen, rb_enc_mbminlen, and search_nonascii().
Referenced by rb_enc_nth(), rb_str_substr(), and str_nth().
|
static |
Definition at line 1543 of file string.c.
Referenced by rb_str_index(), rb_str_index_m(), rb_str_justify(), rb_str_offset(), rb_str_rindex_m(), and rb_str_substr().
Definition at line 869 of file string.c.
References assert, ELTS_SHARED, FL_SET, FL_UNSET, len, OBJ_FROZEN, OBJ_INFECT, rb_enc_cr_str_exact_copy(), rb_str_new4, RSTRING, RSTRING_LEN, RSTRING_PTR, STR_ASSOC, STR_ASSOC_P, str_replace_shared(), STR_SET_NOEMBED, and STR_SHARED_P.
Referenced by rb_str_replace(), rb_str_resurrect(), and str_duplicate().
Definition at line 603 of file string.c.
References ELTS_SHARED, FL_SET, rb_enc_cr_str_exact_copy(), rb_str_new_frozen(), RSTRING, RSTRING_EMBED_LEN_MAX, RSTRING_LEN, RSTRING_PTR, STR_NOEMBED, STR_SET_EMBED, and STR_SET_EMBED_LEN.
Referenced by str_new_shared(), and str_replace().
|
static |
Definition at line 1077 of file string.c.
References ENC_CODERANGE, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, len, p, rb_enc_strlen_cr(), rb_utf8_encoding(), RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), and STR_ENC_GET.
Referenced by rb_str_aref(), rb_str_aset(), rb_str_index(), rb_str_index_m(), rb_str_justify(), rb_str_length(), rb_str_rindex(), rb_str_rindex_m(), rb_str_rpartition(), rb_str_splice(), rb_str_strlen(), and rb_str_substr().
Definition at line 7643 of file string.c.
References rb_str_aref_m(), and rb_sym_to_s().
Referenced by Init_String().
Definition at line 7523 of file string.c.
References rb_eArgError, rb_funcall_with_block(), and rb_raise().
Referenced by sym_to_proc().
Definition at line 7708 of file string.c.
References rb_id2str(), rb_str_capitalize(), rb_str_intern(), and SYM2ID.
Referenced by Init_String().
Definition at line 7613 of file string.c.
References Qnil, rb_str_casecmp(), rb_sym_to_s(), and SYMBOL_P.
Referenced by Init_String().
Definition at line 7596 of file string.c.
References Qnil, rb_str_cmp_m(), rb_sym_to_s(), and SYMBOL_P.
Referenced by Init_String().
Definition at line 7695 of file string.c.
References rb_id2str(), rb_str_downcase(), rb_str_intern(), and SYM2ID.
Referenced by Init_String().
Definition at line 7669 of file string.c.
References rb_id2str(), rb_str_empty(), and SYM2ID.
Referenced by Init_String().
Definition at line 7734 of file string.c.
References rb_id2str(), rb_obj_encoding(), and SYM2ID.
Referenced by Init_String().
Definition at line 7421 of file string.c.
Referenced by Init_String().
Definition at line 7451 of file string.c.
References len, memmove(), NULL, rb_default_external_encoding(), rb_default_internal_encoding(), rb_enc_str_new(), rb_enc_symname_p(), rb_id2str(), rb_str_inspect(), rb_str_is_ascii_only_p(), rb_str_resize(), RSTRING_LEN, RSTRING_PTR, STR_ENC_GET, strlen(), SYM2ID, and sym_printable().
Referenced by get_exception_sym2type(), and Init_String().
Definition at line 7656 of file string.c.
References rb_id2str(), rb_str_length(), and SYM2ID.
Referenced by Init_String().
Definition at line 7629 of file string.c.
References rb_str_match(), and rb_sym_to_s().
Referenced by Init_String().
|
static |
Definition at line 7429 of file string.c.
References FALSE, rb_enc_codepoint_len(), rb_enc_isprint, and TRUE.
Referenced by sym_inspect().
Definition at line 7582 of file string.c.
References rb_str_intern(), rb_str_succ(), and rb_sym_to_s().
Referenced by Init_String().
Definition at line 7721 of file string.c.
References rb_id2str(), rb_str_intern(), rb_str_swapcase(), and SYM2ID.
Referenced by Init_String().
Definition at line 7544 of file string.c.
References id, Qfalse, Qnil, RARRAY_PTR, rb_ary_store(), rb_ary_tmp_new(), rb_gc_register_mark_object(), rb_proc_new(), sym, SYM2ID, and sym_call().
Referenced by Init_String().
Definition at line 7682 of file string.c.
References rb_id2str(), rb_str_intern(), rb_str_upcase(), and SYM2ID.
Referenced by Init_String().
Definition at line 5375 of file string.c.
References FALSE, NIL_P, rb_hash_lookup, TRUE, UINT2NUM(), and v.
Referenced by rb_str_count(), rb_str_delete_bang(), and rb_str_squeeze_bang().
|
static |
Definition at line 5315 of file string.c.
References buf, tr::gen, i, key, tr::max, NIL_P, tr::now, tr::p, tr::pend, Qtrue, rb_enc_ascget(), rb_hash_aref(), rb_hash_aset(), rb_hash_new(), RSTRING_LEN, RSTRING_PTR, trnext(), and UINT2NUM().
Referenced by rb_str_count(), rb_str_delete_bang(), and rb_str_squeeze_bang().
Definition at line 5025 of file string.c.
References ALLOC_N, buf, CHECK_IF_ASCII, ENC_CODERANGE, ENC_CODERANGE_7BIT, ENC_CODERANGE_BROKEN, ENC_CODERANGE_SET, ENC_CODERANGE_VALID, tr::gen, hash(), i, last, max(), tr::max, memcmp(), NIL_P, tr::now, NUM2INT, tr::p, tr::pend, Qnil, Qtrue, rb_enc_ascget(), rb_enc_associate(), rb_enc_check(), rb_enc_codelen(), rb_enc_codepoint_len(), rb_enc_mbcput, rb_enc_mbmaxlen, rb_hash_aset(), rb_hash_lookup, rb_hash_new(), rb_str_delete_bang(), REALLOC_N, RSTRING, RSTRING_END, RSTRING_LEN, RSTRING_PTR, single_byte_optimizable(), STR_EMBED_P, str_modify_keep_cr(), STR_SET_NOEMBED, StringValue, trans, trnext(), UINT2NUM(), and xfree().
Referenced by rb_str_tr(), rb_str_tr_bang(), rb_str_tr_s(), and rb_str_tr_s_bang().
|
static |
Definition at line 4978 of file string.c.
References tr::gen, tr::max, tr::now, tr::p, tr::pend, rb_eArgError, rb_enc_codepoint_len(), and rb_raise().
Referenced by tr_setup_table(), and tr_trans().
|
static |
VALUE rb_cString |
Definition at line 51 of file string.c.
Referenced by Init_String(), rb_str_buf_new(), rb_str_new(), rb_str_resurrect(), rb_str_to_s(), and rb_sym_to_s().
VALUE rb_cSymbol |
Definition at line 52 of file string.c.
Referenced by Init_String().
VALUE rb_fs |
Definition at line 141 of file string.c.
Referenced by Init_String(), and rb_str_split_m().