別のキーワード
ライブラリ
- ビルトイン (2308)
- abbrev (12)
- bigdecimal (72)
- csv (72)
- digest (60)
- erb (48)
-
irb
/ cmd / help (12) - json (72)
-
json
/ add / bigdecimal (12) -
json
/ add / exception (12) - kconv (12)
- logger (12)
- mkmf (12)
-
net
/ http (96) - openssl (12)
- optparse (312)
- pathname (36)
- psych (12)
- rake (60)
-
rexml
/ document (156) -
ripper
/ lexer (24) -
rubygems
/ gem _ path _ searcher (12) -
rubygems
/ specification (24) - stringio (122)
- strscan (180)
-
webrick
/ httprequest (12) - win32ole (24)
クラス
-
ARGF
. class (12) - Array (33)
- BasicObject (12)
- BigDecimal (84)
- Binding (7)
-
CSV
:: Table (72) - Class (12)
-
Digest
:: Base (60) - ERB (48)
-
Encoding
:: Converter (72) -
Encoding
:: InvalidByteSequenceError (12) - Enumerator (24)
- Exception (44)
-
Gem
:: GemPathSearcher (12) -
Gem
:: Specification (24) - IO (8)
-
IRB
:: ExtendCommand :: Help (12) - Integer (24)
-
JSON
:: State (48) - Logger (12)
- MatchData (24)
- Method (12)
- Module (376)
-
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (48) - Object (249)
-
OpenSSL
:: BN (12) - OptionParser (264)
- Pathname (36)
-
Psych
:: ScalarScanner (12) -
REXML
:: Attribute (36) -
REXML
:: Attributes (36) -
REXML
:: DocType (24) -
REXML
:: Element (60) -
Rake
:: FileList (60) - Random (12)
- Regexp (12)
-
Ripper
:: Lexer (24) -
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (94) - String (1015)
- StringIO (122)
- StringScanner (180)
- Struct (24)
- Symbol (59)
- Thread (32)
-
Thread
:: Backtrace :: Location (72) - Time (12)
- UnboundMethod (96)
-
WEBrick
:: HTTPRequest (12) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIANT (12)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
-
Net
:: HTTPHeader (36) -
OptionParser
:: Arguable (48)
キーワード
- % (12)
- + (12)
- <=> (12)
- == (24)
- === (36)
- =~ (9)
- [] (132)
- []= (24)
-
_ _ id _ _ (12) -
_ dump (24) - abbrev (12)
-
absolute
_ path (24) -
alias
_ method (4) -
arg
_ config (12) - arity (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) -
attribute
_ of (12) - backtrace (24)
-
base
_ label (24) -
basic
_ auth (12) -
beginning
_ of _ line? (12) - binread (12)
- body (24)
- bol? (12)
- byteindex (3)
- byterindex (3)
- bytes (50)
- bytesize (12)
- byteslice (36)
- casecmp (12)
- casecmp? (18)
- chars (12)
- class (12)
-
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (24)
- closed? (12)
- codepoints (12)
- coerce (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - convert (12)
-
define
_ method (24) -
define
_ singleton _ method (24) - digest (12)
- digest! (12)
- disasm (12)
- disassemble (12)
- dump (12)
- dup (12)
-
each
_ byte (48) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ grapheme _ cluster (8) - empty? (24)
- encode (36)
-
end
_ with? (18) - entity (12)
- eos? (12)
- eql? (24)
-
error
_ bytes (12) - execute (12)
- filename (12)
- filename= (12)
- finish (12)
- formatter (12)
- freeze (12)
-
get
_ byte (12) - getbyte (36)
- getc (12)
- getch (12)
-
grapheme
_ clusters (8) - gsub (48)
- gsub! (60)
- hash (12)
- hexdigest (12)
- hexdigest! (12)
- include? (12)
-
insert
_ output (12) - inspect (121)
-
instance
_ method (12) - intern (12)
-
is
_ a? (12) - iseuc (12)
- itself (12)
-
json
_ creatable? (12) -
kind
_ of? (12) - label (24)
- lex (12)
-
lib
_ dirs _ for (12) - match (12)
- match? (30)
- matched? (12)
-
matched
_ size (12) - method (12)
-
method
_ defined? (12) -
module
_ function (12) - name (29)
- namespace (24)
- namespaces (24)
- next (12)
- next! (12)
-
object
_ nl (12) -
object
_ nl= (12) - oct (12)
- on (144)
- order (48)
- order! (48)
- pack (21)
- parse (12)
- parse! (12)
- path (36)
- peek (12)
- peep (12)
- permute (24)
- permute! (24)
- pread (8)
- prefix (12)
- prefixes (24)
- print (12)
- printf (12)
- private (48)
-
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
proxy
_ basic _ auth (12) - public (24)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putback (24)
- puts (12)
- query (12)
-
read
_ body (24) - readbyte (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) - replacement= (12)
- rest? (12)
- result (12)
-
rubygems
_ version (12) - scan (24)
-
scan
_ full (12) - scrub (36)
- scrub! (36)
-
search
_ full (12) -
set
_ backtrace (12) - setbyte (12)
-
singleton
_ class (12) -
singleton
_ method (12) - slice (72)
- slice! (12)
-
source
_ location (19) -
space
_ before (12) -
space
_ before= (12) - split (31)
- src (12)
-
start
_ with? (18) - strftime (12)
- sub (60)
- sub! (48)
-
sub
_ type (12) - succ (12)
- succ! (12)
- sum (12)
- tainted? (6)
- text (12)
- then (14)
-
to
_ binary (10) -
to
_ csv (12) -
to
_ i (12) -
to
_ json (36) -
to
_ ruby (12) -
to
_ s (158) -
to
_ str (12) -
to
_ string (12) -
to
_ sym (12) - tokenize (12)
-
undef
_ method (12) -
unicode
_ normalized? (11) - unpack (12)
- unpack1 (9)
- upto (12)
-
valid
_ encoding? (12) - value (12)
-
values
_ at (12) -
with
_ object (24) - write (12)
- xpath (12)
-
yield
_ self (16)
検索結果
先頭5件
-
String
# b -> String (30315.0) -
self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
...self の文字エンコーディングを ASCII-8BIT にした文字列の複製を返します。
//emlist[例][ruby]{
'abc123'.encoding # => #<Encoding:UTF-8>
'abc123'.b.encoding # => #<Encoding:ASCII-8BIT>
//}... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (21649.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
# bytes {|byte| . . . } -> self (21431.0) -
文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
...h_byte.to_a と同じです)
//emlist[例][ruby]{
"str".bytes # => [115, 116, 114]
//}
ブロックが指定された場合は String#each_byte と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#......each_byte... -
String
# byteindex(pattern , offset = 0) -> Integer | nil (21419.0) -
文字列の offset から右に向かって pattern を検索し、 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...文字列の offset から右に向かって pattern を検索し、
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定......します。
offset が負の場合、文字列の末尾から数えた位置から探索します。
@param pattern 探索する部分文字列または正規表現
@param offset 探索を開始するバイト単位のオフセット
@raise IndexError オフセットが文字列の境界......emlist[例][ruby]{
'foo'.byteindex('f') # => 0
'foo'.byteindex('o') # => 1
'foo'.byteindex('oo') # => 1
'foo'.byteindex('ooo') # => nil
'foo'.byteindex(/f/) # => 0
'foo'.byteindex(/o/) # => 1
'foo'.byteindex(/oo/) # => 1
'foo'.byteindex(/ooo/) # => nil
'foo'.byteindex('o', 1) # => 1
'foo'.byteinde... -
String
# each _ byte {|byte| . . . } -> self (21413.0) -
文字列の各バイトに対して繰り返します。
...文字列の各バイトに対して繰り返します。
//emlist[例][ruby]{
"str".each_byte do |byte|
p byte
end
# => 115
# => 116
# => 114
"あ".each_byte do |byte|
p byte
end
# => 227
# => 129
# => 130
//}
@see String#bytes... -
String
# bytes -> [Integer] (21331.0) -
文字列の各バイトを数値の配列で返します。(self.each_byte.to_a と同じです)
...h_byte.to_a と同じです)
//emlist[例][ruby]{
"str".bytes # => [115, 116, 114]
//}
ブロックが指定された場合は String#each_byte と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#......each_byte... -
String
# byteslice(nth , len=1) -> String | nil (21327.0) -
nth バイト目から長さ len バイトの部分文字列を新しく作って返します。 nth が負の場合は文字列の末尾から数えます。引数が範囲外を指定した場合は nil を返します。
...nth バイト目から長さ len バイトの部分文字列を新しく作って返します。
nth が負の場合は文字列の末尾から数えます。引数が範囲外を指定した場合は
nil を返します。
@param nth 取得したい文字列の開始バイトを整数で指定し......。
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1, 2) # => "el"
"\u3042\u3044\u3046".byteslice(0, 3) # => "\u3042"
//}
@see String#slice
@see String#bytesplice... -
String
# byteslice(range) -> String | nil (21327.0) -
range で指定したバイトの範囲に含まれる部分文字列を返します。引数が範囲 外を指定した場合は nil を返します。
...ェクト
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1..2) # => "el"
"\x03\u3042\xff".byteslice(1..3) # => "\u3042"
//}
@see String#slice
@see String#bytesplice... -
String
# byteslice(nth) -> String | nil (21322.0) -
nth バイト目の文字を返します。nth が負の場合は文字列の末尾から数えます。 引数が範囲外を指定した場合は nil を返します。
...nth バイト目の文字を返します。nth が負の場合は文字列の末尾から数えます。
引数が範囲外を指定した場合は nil を返します。
@param nth 文字の位置を表す整数を指定します。
@return 切り出した文字列を返します。戻り値の......文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1) # => "e"
"hello".byteslice(-1) # => "o"
"\u3042".byteslice(0) # => "\xE3"
"\u3042".byteslice(1) # => "\x81"
//}
@see String#slice... -
String
# byteslice(nth , len=1) -> String | nil (21320.0) -
nth バイト目から長さ len バイトの部分文字列を新しく作って返します。 nth が負の場合は文字列の末尾から数えます。引数が範囲外を指定した場合は nil を返します。
...nth バイト目から長さ len バイトの部分文字列を新しく作って返します。
nth が負の場合は文字列の末尾から数えます。引数が範囲外を指定した場合は
nil を返します。
@param nth 取得したい文字列の開始バイトを整数で指定し......数で指定します。
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1, 2) # => "el"
"\u3042\u3044\u3046".byteslice(0, 3) # => "\u3042"
//}
@see String#slice... -
String
# byteslice(range) -> String | nil (21320.0) -
range で指定したバイトの範囲に含まれる部分文字列を返します。引数が範囲 外を指定した場合は nil を返します。
...を示す Range オブジェクト
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1..2) # => "el"
"\x03\u3042\xff".byteslice(1..3) # => "\u3042"
//}
@see String#slice... -
String
# bytesize -> Integer (21313.0) -
文字列のバイト長を整数で返します。
...文字列のバイト長を整数で返します。
//emlist[例][ruby]{
#coding:UTF-8
# 実行結果は文字コードによって異なります。
p "いろは".size #=> 3
p "いろは".bytesize #=> 9
//}
@see String#size...