1477件ヒット
[1401-1477件を表示]
(0.119秒)
キーワード
- % (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
# reverse! -> self (3109.0) -
文字列を文字単位で左右逆転します。
...文字列を文字単位で左右逆転します。
//emlist[例][ruby]{
str = "foobar"
str.reverse!
p str # => "raboof"
//}... -
String
# squeeze!(*chars) -> self | nil (3109.0) -
chars に含まれる文字が複数並んでいたら 1 文字にまとめます。
...chars に含まれる文字が複数並んでいたら 1 文字にまとめます。
chars の形式は tr(1) と同じです。つまり、
`a-c' は a から c を意味し、"^0-9" のように
文字列の先頭が `^' の場合は指定文字以外を意味します。
`-' は文字列の両......します。
@param chars 1文字にまとめる文字。
//emlist[例][ruby]{
str = "112233445566778899"
str.squeeze!
p str # =>"123456789"
str = "112233445566778899"
str.squeeze!("2-8")
p str # =>"11234567899"
str = "123456789"
str.squeeze! # => nil
p str # =>"123456789"
//}... -
String
# iseuc -> bool (3030.0) -
self が EUC-JP なバイト列として正当であるかどうかを判定します。
...
self が EUC-JP なバイト列として正当であるかどうかを判定します。
Kconv.#iseuc(self) と同じです。
//emlist[例][ruby]{
require 'kconv'
euc_str = "\
\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
\xa5\xd7\xa5\xed\xa5\xb0\xa5\xe9\xa5\xdf\xa5\xf3\xa5\......52\x75\x62\x79".force_encoding('EUC-JP')
sjis_str = "\
\x83\x49\x83\x75\x83\x57\x83\x46\x83\x4e\x83\x67\x8e\x77\x8c\xfc\
\x83\x76\x83\x8d\x83\x4f\x83\x89\x83\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\
\x52\x75\x62\x79".force_encoding('Shift_JIS')
euc_str.iseuc # => true
sjis_str.iseuc # => false
//}... -
String
# unicode _ normalized?(form = :nfc) -> bool (3030.0) -
self が引数 form で指定された正規化形式で Unicode 正規化された文字列か どうかを返します。
...
self が引数 form で指定された正規化形式で Unicode 正規化された文字列か
どうかを返します。
@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定しま
す。省略した場合は :nfc になります。
@raise Encoding::Co......mpatibilityError self が Unicode 文字列ではない場合
に発生します。
//emlist[例][ruby]{
"a\u0300".unicode_normalized? # => false
"a\u0300".unicode_normalized?(:nfd) # => true
"\u00E0".unicode_normalized? # => true
"\u00E0".unicode......_normalized?(:nfd) # => false
"\xE0".force_encoding('ISO-8859-1').unicode_normalized?
# => Encoding::CompatibilityError raised
//}
@see String#unicode_normalize, String#unicode_normalize!... -
String
# []=(regexp , name , val) (3014.0) -
正規表現 regexp の name で指定した名前付きキャプチャにマッチする最初の 部分文字列を文字列 val で置き換えます。
...範囲の部分文字列と置き換えたい文字列
@return val を返します。
@raise IndexError name で指定した名前付きキャプチャが存在しない場合に発
生します。
//emlist[例][ruby]{
s = "FooBar"
s[/(?<foo>[A-Z]..)(?<bar>[A-Z]..)/, "foo"] = "B... -
String
# []=(regexp , val) (3014.0) -
正規表現 regexp にマッチした部分文字列全体を val で置き換えます。
...い部分文字列のパターンを示す正規表現
@param val 置き換えたい文字列
@return val を返します。
@raise IndexError 正規表現がマッチしなかった場合に発生します。
//emlist[例][ruby]{
buf = "string"
buf[/tr../] = "!!"
p buf # => "s!!g"
//}... -
String
# []=(range , val) (3009.0) -
rangeで指定したインデックスの範囲に含まれる部分文字列を文字列 val で置き換えます。
...rangeで指定したインデックスの範囲に含まれる部分文字列を文字列 val で置き換えます。
@param range 置き換えたい範囲を示す Range オブジェクト
@return val を返します。...