1375件ヒット
[1301-1375件を表示]
(0.094秒)
キーワード
- % (12)
- * (12)
- + (12)
- << (12)
- <=> (12)
- == (12)
- === (12)
- =~ (12)
- [] (72)
- []= (84)
- byteindex (3)
- byterindex (3)
- byteslice (36)
- bytesplice (10)
- capitalize (9)
- capitalize! (9)
- casecmp (12)
- casecmp? (9)
- center (12)
- concat (21)
- count (12)
- crypt (12)
- delete (12)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) - downcase (9)
- downcase! (9)
-
each
_ line (24) - encode (36)
- encode! (24)
-
end
_ with? (12) - eql? (12)
- ext (12)
-
force
_ encoding (12) - getbyte (12)
- gsub (48)
- gsub! (48)
- include? (12)
- index (12)
- insert (12)
- kconv (12)
- lines (24)
- ljust (12)
-
parse
_ csv (12) - partition (12)
-
pathmap
_ replace (12) - prepend (21)
- rindex (12)
- rjust (12)
- rpartition (12)
- scan (24)
- scanf (12)
- scrub (36)
- scrub! (36)
- setbyte (12)
- slice (72)
- split (19)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (12) - sub (36)
- sub! (36)
- sum (12)
- swapcase (9)
- swapcase! (9)
-
to
_ i (12) - tr (12)
- tr! (12)
-
tr
_ s (12) -
tr
_ s! (12) -
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
- upcase (9)
- upcase! (9)
- upto (12)
検索結果
先頭5件
-
String
# concat(*arguments) -> self (30018.0) -
self に複数の文字列を破壊的に連結します。
...相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。
self を返します。
@param arguments 複数の文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "foo"
str.concat
p str # => "foo"
str = "foo"
str.conca... -
String
# count(*chars) -> Integer (30014.0) -
chars で指定された文字が文字列 self にいくつあるか数えます。
...よりエスケープできます。
引数を複数指定した場合は、
すべての引数にマッチした文字だけを数えます。
@param chars 出現回数を数える文字のパターン
//emlist[例][ruby]{
p 'abcdefg'.count('c') # => 1
p '123456789'.count('2378'... -
String
# force _ encoding(encoding) -> self (30014.0) -
文字列の持つエンコーディング情報を指定された encoding に変えます。
...れず、検査もされません。
Array#pack などで得られたバイト列のエンコーディングを指定する時に使います。
@param encoding 変更するエンコーディング情報を表す文字列か Encoding オブジェクトを指定します。
//emlist[例][ruby]{
s... -
String
# getbyte(index) -> Integer | nil (30014.0) -
index バイト目のバイトを整数で返します。
...に負を指定すると末尾から数えた位置のバイト
を取り出します。
範囲外を指定した場合は nil を返します。
@param index バイトを取り出す位置
//emlist[例][ruby]{
s = "tester"
s.bytes # => [116, 101, 115, 116, 101, 114]
s.getbyte(0)... -
String
# include?(substr) -> bool (30014.0) -
文字列中に部分文字列 substr が含まれていれば真を返します。
...文字列中に部分文字列 substr が含まれていれば真を返します。
@param substr 検索する文字列
//emlist[例][ruby]{
"hello".include? "lo" #=> true
"hello".include? "ol" #=> false
"hello".include? ?h #=> true
//}... -
String
# squeeze!(*chars) -> self | nil (30014.0) -
chars に含まれる文字が複数並んでいたら 1 文字にまとめます。
...べての引数にマッチする文字を 1 文字にまとめます。
1 文字もまとめられなかった場合は nil を返します。
@param chars 1文字にまとめる文字。
//emlist[例][ruby]{
str = "112233445566778899"
str.squeeze!
p str # =>"123456789"
str = "112233445566... -
String
# sum(bits = 16) -> Integer (30014.0) -
文字列の bits ビットのチェックサムを計算します。
...urn 0 if sum == 0
sum & ((1 << bits) - 1)
end
//}
例えば以下のコードで UNIX System V の
sum(1) コマンドと同じ値が得られます。
//emlist[例][ruby]{
sum = 0
ARGF.each_line do |line|
sum += line.sum
end
sum %= 65536
//}
@param bits チェックサムのビット数...