674件ヒット
[1-100件を表示]
(0.152秒)
ライブラリ
クラス
- Array (21)
-
Fiddle
:: Pointer (24) - GetoptLong (24)
-
Net
:: FTP :: MLSxEntry (10) -
Net
:: IMAP :: ContentDisposition (12) -
Net
:: IMAP :: FetchData (12) - Random (12)
- String (223)
- StringIO (24)
- StringScanner (96)
- Struct (12)
- Symbol (24)
- UnboundMethod (36)
-
Zlib
:: Deflate (12) -
Zlib
:: Inflate (12)
モジュール
-
CGI
:: HtmlExtension (120)
キーワード
- == (12)
- [] (84)
- arity (12)
- attr (12)
- byterindex (3)
- bytes (12)
- bytesize (12)
- clear (12)
-
each
_ grapheme _ cluster (16) - eql? (12)
- facts (10)
-
file
_ field (24) - get (12)
-
get
_ option (12) - length (36)
-
matched
_ size (12) - matchedsize (12)
- pack (21)
- param (12)
-
password
_ field (24) - peek (12)
- peep (12)
-
rest
_ size (12) - restsize (12)
- rindex (12)
-
scrolling
_ list (24) -
set
_ dictionary (24) - slice (72)
- terminate (12)
-
text
_ field (24) -
to
_ str (24) - unpack (12)
検索結果
先頭5件
-
String
# size -> Integer (27226.0) -
文字列の文字数を返します。バイト数を知りたいときは bytesize メソッドを使ってください。
...いときは bytesize メソッドを使ってください。
//emlist[例][ruby]{
"test".length # => 4
"test".size # => 4
"テスト".length # => 3
"テスト".size # => 3
"\x80\u3042".length # => 2
"\x80\u3042".size # => 2
//}
@see String#bytesize... -
StringIO
# size -> Integer (21202.0) -
文字列の長さを返します。
文字列の長さを返します。 -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (18231.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...ンデックス offset から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現......で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探索はその開始....../emlist[String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("... -
String
# rindex(pattern , pos = self . size) -> Integer | nil (18226.0) -
文字列のインデックス pos から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のインデックスを返します。 見つからなければ nil を返します。
...字列のインデックス pos から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定......します。
pos が負の場合は、文字列の末尾から数えた位置から探索します。
rindex と String#index とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探索はその開始位置を右から......。
//emlist[String#index の場合][ruby]{
p "stringstring".index("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#rindex の場合][ruby]{
p "stringstring".rindex("ing", -1)... -
String
# bytesize -> Integer (18219.0) -
文字列のバイト長を整数で返します。
...文字列のバイト長を整数で返します。
//emlist[例][ruby]{
#coding:UTF-8
# 実行結果は文字コードによって異なります。
p "いろは".size #=> 3
p "いろは".bytesize #=> 9
//}
@see String#size... -
StringScanner
# rest _ size -> Integer (15242.0) -
文字列の残りの長さを返します。 stringscanner.rest.size と同じです。
...
stringscanner.rest.size と同じです。
StringScanner#restsize は将来のバージョンで削除される予定です。
代わりにStringScanner#rest_size を使ってください。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
p s.rest_size # => 11
p s.res......t.size # => 11
//}... -
StringScanner
# restsize -> Integer (15242.0) -
文字列の残りの長さを返します。 stringscanner.rest.size と同じです。
...
stringscanner.rest.size と同じです。
StringScanner#restsize は将来のバージョンで削除される予定です。
代わりにStringScanner#rest_size を使ってください。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
p s.rest_size # => 11
p s.res......t.size # => 11
//}... -
String
# each _ grapheme _ cluster -> Enumerator (15225.0) -
文字列の書記素クラスタに対して繰り返します。
...
String#each_char と違って、
Unicode Standard Annex #29 (https://unicode.org/reports/tr29/)
で定義された書記素クラスタに対して繰り返します。
//emlist[例][ruby]{
"a\u0300".each_char.to_a.size # => 2
"a\u0300".each_grapheme_cluster.to_a.size # => 1
//}
@see String#grap......heme_clusters... -
String
# each _ grapheme _ cluster {|grapheme _ cluster| block } -> self (15225.0) -
文字列の書記素クラスタに対して繰り返します。
...
String#each_char と違って、
Unicode Standard Annex #29 (https://unicode.org/reports/tr29/)
で定義された書記素クラスタに対して繰り返します。
//emlist[例][ruby]{
"a\u0300".each_char.to_a.size # => 2
"a\u0300".each_grapheme_cluster.to_a.size # => 1
//}
@see String#grap......heme_clusters... -
Symbol
# size -> Integer (15220.0) -
シンボルに対応する文字列の長さを返します。
...シンボルに対応する文字列の長さを返します。
(self.to_s.length と同じです。)
:foo.length #=> 3
@see String#length, String#size...