1477件ヒット
[1201-1300件を表示]
(0.054秒)
別のキーワード
キーワード
- % (12)
- * (12)
- + (12)
- +@ (10)
- -@ (10)
- << (12)
- <=> (12)
- == (12)
- === (12)
- =~ (12)
- [] (72)
- []= (84)
-
append
_ as _ bytes (1) - b (12)
- byterindex (3)
- bytes (24)
- capitalize! (12)
- casecmp (12)
- casecmp? (9)
- center (12)
- chars (24)
- chomp (12)
- chomp! (12)
- chop! (12)
- chr (12)
- clear (12)
- codepoints (24)
- concat (21)
- count (12)
- crypt (12)
- dedup (3)
- delete (12)
- delete! (12)
-
delete
_ prefix! (8) -
delete
_ suffix! (8) - downcase! (12)
-
each
_ byte (24) -
each
_ char (24) -
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (24) - encode (36)
- encode! (24)
-
end
_ with? (12) -
force
_ encoding (12) -
grapheme
_ clusters (16) - gsub! (48)
- hash (12)
- hex (12)
- insert (12)
- iseuc (12)
- lines (24)
- ljust (12)
- lstrip! (12)
- match (24)
- match? (9)
- next (12)
- next! (12)
- ord (12)
-
parse
_ csv (12) - partition (12)
- replace (12)
- reverse! (12)
- rindex (12)
- rjust (12)
- rpartition (12)
- rstrip! (12)
- scan (24)
- scrub (36)
- scrub! (36)
- slice (72)
- split (14)
- squeeze! (12)
-
start
_ with? (12) - strip! (12)
- sub! (36)
- succ (12)
- succ! (12)
- swapcase! (12)
-
to
_ s (12) -
to
_ str (12) -
tr
_ s! (12) - undump (8)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - upcase! (12)
- upto (12)
検索結果
先頭5件
-
String
# hash -> Integer (30.0) -
self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。
...
self のハッシュ値を返します。
eql? で等しい文字列は、常にハッシュ値も等しくなります。
//emlist[例][ruby]{
"test".hash # => 4038258770210371295
("te" + "st").hash == "test".hash # => true
//}
@see Hash... -
String
# replace(other) -> String (30.0) -
self の内容を other の内容で置き換えます。
...
self の内容を other の内容で置き換えます。
//emlist[例][ruby]{
str = "foo"
str.replace "bar"
p str # => "bar"
//}... -
String
# slice(nth , len) -> String | nil (30.0) -
nth 文字目から長さ len 文字の部分文字列を新しく作って返します。 nth が負の場合は文字列の末尾から数えます。
...したい文字列の長さを正の整数で指定します。
@return nth が範囲外を指す場合は nil を返します。
//emlist[例][ruby]{
str0 = "bar"
str0[2, 1] #=> "r"
str0[2, 0] #=> ""
str0[2, 100] #=> "r" (右側を超えても平気)
str0[-1, 1] #=>... -
String
# start _ with?(*prefixes) -> bool (30.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...
self の先頭が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_w......ith?("ing", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
String
# start _ with?(*strs) -> bool (30.0) -
self の先頭が strs のいずれかであるとき true を返します。
...
self の先頭が strs のいずれかであるとき true を返します。
@param strs パターンを表す文字列 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # =>......true
//}
@see String#end_with?... -
String
# undump -> String (30.0) -
self のエスケープを戻したものを返します。
...self のエスケープを戻したものを返します。
String#dump の逆変換にあたります。
//emlist[例][ruby]{
"\"hello \\n ''\"".undump #=> "hello \n ''"
//}
@see String#dump... -
String
# ord -> Integer (26.0) -
文字列の最初の文字の文字コードを整数で返します。
...の文字コードを整数で返します。
self が空文字列のときは例外を発生します。
@return 文字コードを表す整数
@raise ArgumentError self の長さが 0 のとき発生
//emlist[例][ruby]{
p "a".ord # => 97
//}
@see Integer#chr, String#chr... -
String
# []=(nth , len , val) (25.0) -
nth 番目の文字から len 文字の部分文字列を文字列 val で置き換えます。
...@param len 置き換えたい部分文字列の長さ
@param val 指定範囲の部分文字列と置き換える文字列
@return val を返します。
//emlist[例][ruby]{
buf = "string"
buf[1, 4] = "!!"
p buf # => "s!!g"
buf = "string"
buf[1, 0] = "!!"
p buf # => "s!!tring"
//}... -
String
# []=(nth , val) (25.0) -
nth 番目の文字を文字列 val で置き換えます。
...nth 番目の文字を文字列 val で置き換えます。
@param nth 置き換えたい文字の位置を指定します。
@param val 置き換える文字列を指定します。
@return val を返します。
//emlist[例][ruby]{
buf = "string"
buf[1] = "!!"
p buf # => "s!!ring"
//}... -
String
# []=(regexp , name , val) (25.0) -
正規表現 regexp の name で指定した名前付きキャプチャにマッチする最初の 部分文字列を文字列 val で置き換えます。
...置き換えたい文字列
@return val を返します。
@raise IndexError name で指定した名前付きキャプチャが存在しない場合に発
生します。
//emlist[例][ruby]{
s = "FooBar"
s[/(?<foo>[A-Z]..)(?<bar>[A-Z]..)/, "foo"] = "Baz"
p s # => "BazBar"
//}...