別のキーワード
ライブラリ
- ビルトイン (3881)
- abbrev (12)
- bigdecimal (60)
-
cgi
/ core (12) - csv (132)
- digest (60)
- erb (24)
-
irb
/ cmd / help (12) - json (156)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - logger (12)
- mkmf (12)
-
net
/ http (132) - openssl (12)
- optparse (396)
- pathname (36)
- psych (12)
- rake (24)
-
rexml
/ document (132) -
rubygems
/ installer (12) -
rubygems
/ requirement (12) - socket (12)
- stringio (304)
- strscan (312)
- uri (36)
- win32ole (36)
クラス
-
ARGF
. class (84) - Array (81)
- BasicObject (12)
- BigDecimal (72)
- CGI (12)
- CSV (72)
-
CSV
:: Table (36) - Complex (12)
- Date (12)
- DateTime (12)
-
Digest
:: Base (60) - Dir (19)
- ERB (24)
-
Encoding
:: Converter (84) -
Encoding
:: InvalidByteSequenceError (12) - Enumerator (24)
- Exception (44)
- File (16)
- Float (24)
-
Gem
:: Installer (12) -
Gem
:: Requirement (12) - IO (64)
-
IRB
:: ExtendCommand :: Help (12) - Integer (60)
-
JSON
:: State (48) - Logger (12)
- MatchData (110)
- Method (36)
- Module (600)
-
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (24) - NilClass (7)
- Object (237)
-
OpenSSL
:: BN (12) - OptionParser (348)
- Pathname (36)
- Proc (12)
-
Psych
:: ScalarScanner (12) -
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: CData (24) -
REXML
:: DocType (24) -
REXML
:: Element (24) -
REXML
:: Entity (12) -
REXML
:: Text (24) -
Rake
:: FileList (24) - Random (12)
- Range (100)
- Rational (36)
- Regexp (60)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (94) - Socket (12)
- String (1874)
- StringIO (304)
- StringScanner (312)
- Struct (36)
- Symbol (59)
- Thread (10)
-
Thread
:: Backtrace :: Location (72) - Time (24)
- TracePoint (19)
-
URI
:: MailTo (36) - UnboundMethod (60)
-
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIANT (12)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (12)
-
Net
:: HTTPHeader (96) -
OptionParser
:: Arguable (48)
キーワード
- % (26)
- * (36)
- + (12)
- +@ (10)
- -@ (10)
- << (24)
- <=> (24)
- == (24)
- === (48)
- =~ (40)
- [] (204)
- []= (96)
-
_ _ id _ _ (12) -
_ dump (24) - abbrev (12)
-
absolute
_ path (24) -
add
_ element (12) -
alias
_ method (12) -
arg
_ config (12) - attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) -
attribute
_ of (12) - autoload (12)
- autoload? (12)
- backtrace (12)
-
base
_ label (24) -
basic
_ auth (12) - binread (12)
- body (12)
- byteindex (3)
- byterindex (3)
- bytes (50)
- bytesize (12)
- byteslice (36)
- capitalize (12)
- capitalize! (12)
- captures (12)
- casecmp (24)
- casecmp? (18)
- center (12)
- charpos (12)
- chars (24)
- check (12)
-
check
_ until (12) - children (7)
- chomp (12)
- chomp! (12)
- chop (12)
- chop! (12)
- chr (36)
- class (12)
-
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clear (12)
- clone (12)
- codepoints (24)
- coerce (12)
-
col
_ sep (12) - concat (33)
- connect (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - convert (12)
- count (12)
- cover? (19)
- crypt (12)
-
datetime
_ format (12) - deconstruct (2)
- dedup (3)
-
default
_ argv (12) -
define
_ method (24) -
define
_ singleton _ method (24) - delete (24)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
deprecate
_ constant (12) - digest (12)
- digest! (12)
- disasm (12)
- disassemble (12)
- downcase (12)
- downcase! (12)
- dump (8)
- dup (12)
- each (24)
-
each
_ byte (48) -
each
_ char (24) -
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (48) - encode (36)
- encode! (24)
- encoding (12)
-
end
_ with? (18) - entity (12)
- environment (12)
- eql? (24)
-
error
_ bytes (12) -
eval
_ script (7) - execute (12)
- exist? (12)
- ext (12)
- fetch (36)
- finish (12)
-
force
_ encoding (12) -
formatted
_ program _ filename (12) - freeze (12)
-
get
_ fields (12) - getbyte (24)
- getc (24)
- gets (60)
-
grapheme
_ clusters (16) - gsub (48)
- gsub! (48)
- hash (24)
- header (12)
- headers (12)
- helpfile (12)
- hex (12)
- hexdigest (12)
- hexdigest! (12)
- include? (12)
- indent= (12)
- index (12)
-
inplace
_ mode (12) - insert (12)
-
insert
_ output (12) - inspect (163)
-
instance
_ method (12) - join (12)
- label (24)
- length (12)
- lines (38)
- ljust (12)
- lstrip (12)
- match (24)
- match? (30)
- method (12)
-
method
_ defined? (12) -
module
_ function (36) - name (17)
- name= (10)
- namespace (12)
- next! (12)
-
object
_ nl= (12) - oct (12)
- on (144)
- ord (24)
- order (48)
- order! (48)
- pack (21)
- parse (24)
- parse! (24)
-
parse
_ csv (12) - partition (12)
- path (56)
- pathmap (12)
- peek (12)
- peep (12)
- permute (24)
- permute! (24)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (24)
-
post
_ match (12) -
pre
_ match (12) - pread (8)
- prepend (21)
-
pretty
_ print (12) - print (24)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
program
_ name (12) -
protected
_ method _ defined? (12) -
proxy
_ basic _ auth (12) - public (48)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putback (24)
- puts (12)
- pwrite (8)
-
quote
_ char (12) - read (24)
-
read
_ body (24) - readbyte (12)
- readchar (24)
- readline (24)
- readlines (48)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) - reopen (24)
- replacement (12)
- replacement= (12)
- reset (12)
- result (12)
- rindex (12)
- rjust (12)
-
row
_ sep (12) - rpartition (12)
- rstrip (12)
- rstrip! (12)
- scan (36)
-
scan
_ full (12) -
scan
_ until (12) - scrub (36)
- scrub! (36)
-
search
_ full (12) -
set
_ backtrace (12) - setbyte (12)
- shift (12)
-
singleton
_ class (12) -
singleton
_ method (12) - size (12)
- skip (12)
-
skip
_ until (12) - slice (72)
-
source
_ location (36) - space= (12)
-
space
_ before= (12) - split (31)
- squeeze (12)
- squeeze! (12)
- src (12)
-
start
_ with? (18) - step (31)
- strftime (12)
- string= (12)
- strip (12)
- strip! (12)
- sub (60)
- sub! (36)
- succ! (12)
- sum (12)
-
summary
_ indent (12) - swapcase (12)
- swapcase! (12)
- syswrite (12)
- tainted? (6)
- terminate (12)
- text (12)
- then (14)
-
to
_ a (12) -
to
_ binary (10) -
to
_ c (12) -
to
_ csv (12) -
to
_ f (12) -
to
_ i (12) -
to
_ json (228) -
to
_ mailtext (12) -
to
_ path (8) -
to
_ r (12) -
to
_ rfc822text (12) -
to
_ s (204) -
to
_ str (12) - tokenize (12)
- tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - truncate (12)
-
undef
_ method (12) - undump (8)
- ungetc (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
- unpack1 (9)
- unscan (12)
- upcase (12)
- upcase! (12)
- upto (12)
- value (36)
-
values
_ at (12) -
with
_ object (24) - write (12)
-
yield
_ self (16)
検索結果
先頭5件
-
String
# encode(encoding , **options) -> String (30273.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...われません。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option......変換オプションをキーワード引数で与えます。
@return 変換された文字列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げま......ンコーディングにおいて文字が定義されていない場合に、未定義文字を置換文字で置き換えます。
: :replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエン... -
String
# encode(encoding , from _ encoding , **options) -> String (30273.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...われません。
@param encoding 変換先のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option......変換オプションをキーワード引数で与えます。
@return 変換された文字列
変換オプション
: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げま......ンコーディングにおいて文字が定義されていない場合に、未定義文字を置換文字で置き換えます。
: :replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエン... -
String
# slice(regexp , nth = 0) -> String (30273.0) -
正規表現 regexp の nth 番目の括弧にマッチする最初の部分文字列を返します。 nth を省略したときや 0 の場合は正規表現がマッチした部分文字列全体を返します。 正規表現が self にマッチしなかった場合や nth に対応する括弧がないときは nil を返します。
...情報が組み込み変数 $~ に設定されます。
@param regexp 取得したい文字列のパターンを示す正規表現
@param nth 取得したい正規表現レジスタのインデックス。整数
//emlist[例][ruby]{
p "foobar"[/bar/] # => "bar"
p $~.begin(0) # => 3... -
String
# byteslice(nth) -> String | nil (30270.0) -
nth バイト目の文字を返します。nth が負の場合は文字列の末尾から数えます。 引数が範囲外を指定した場合は nil を返します。
...定した場合は nil を返します。
@param nth 文字の位置を表す整数を指定します。
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1) # => "e"
"hello".byt......eslice(-1) # => "o"
"\u3042".byteslice(0) # => "\xE3"
"\u3042".byteslice(1) # => "\x81"
//}
@see String#slice... -
String
# byteslice(nth , len=1) -> String | nil (30269.0) -
nth バイト目から長さ len バイトの部分文字列を新しく作って返します。 nth が負の場合は文字列の末尾から数えます。引数が範囲外を指定した場合は nil を返します。
...引数が範囲外を指定した場合は
nil を返します。
@param nth 取得したい文字列の開始バイトを整数で指定します。
@param len 取得したい文字列の長さを正の整数で指定します。
@return 切り出した文字列を返します。戻り値の文......字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1, 2) # => "el"
"\u3042\u3044\u3046".byteslice(0, 3) # => "\u3042"
//}
@see String#slice... -
String
# capitalize -> String (30269.0) -
文字列先頭の文字を大文字に、残りを小文字に変更した文字列を返します。 ただし、アルファベット以外の文字は位置に関わらず変更しません。
...ット以外の文字は位置に関わらず変更しません。
//emlist[例][ruby]{
p "foobar--".capitalize # => "Foobar--"
p "fooBAR--".capitalize # => "Foobar--"
p "FOOBAR--".capitalize # => "Foobar--"
//}
@see String#capitalize!, String#upcase,
String#downcase, String#swapcase... -
String
# chars -> [String] (30269.0) -
文字列の各文字を文字列の配列で返します。(self.each_char.to_a と同じです)
...t[例][ruby]{
"hello世界".chars # => ["h", "e", "l", "l", "o", "世", "界"]
//}
ブロックが指定された場合は String#each_char と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_... -
String
# grapheme _ clusters -> [String] (30269.0) -
文字列の書記素クラスタの配列を返します。(self.each_grapheme_cluster.to_a と同じです)
.../emlist[例][ruby]{
"a\u0300".grapheme_clusters # => ["à"]
//}
ブロックが指定された場合は String#each_grapheme_cluster と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_graphe... -
String
# swapcase -> String (30269.0) -
'A' から 'Z' までのアルファベット大文字を小文字に、 'a' から 'z' までのアルファベット小文字を大文字に変更した文字列を返します。
...識する」だけであって、
いわゆる全角アルファベットの大文字小文字までは変換しません。
//emlist[例][ruby]{
p "ABCxyz".swapcase # => "abcXYZ"
p "Access".swapcase # => "aCCESS"
//}
@see String#swapcase!, String#upcase, String#downcase, String#capitalize... -
String
# [](substr) -> String | nil (30268.0) -
self が substr を含む場合、一致した文字列を新しく作って返します。 substr を含まなければ nil を返します。
...した文字列を新しく作って返します。
substr を含まなければ nil を返します。
@param substr 取得したい文字列のパターン。文字列
//emlist[例][ruby]{
substr = "bar"
result = "foobar"[substr]
p result # => "bar"
p substr.equal?(result) # => false
//}... -
String
# slice(substr) -> String | nil (30268.0) -
self が substr を含む場合、一致した文字列を新しく作って返します。 substr を含まなければ nil を返します。
...した文字列を新しく作って返します。
substr を含まなければ nil を返します。
@param substr 取得したい文字列のパターン。文字列
//emlist[例][ruby]{
substr = "bar"
result = "foobar"[substr]
p result # => "bar"
p substr.equal?(result) # => false
//}... -
String
# byteslice(nth) -> String | nil (30264.0) -
nth バイト目の文字を返します。nth が負の場合は文字列の末尾から数えます。 引数が範囲外を指定した場合は nil を返します。
...定した場合は nil を返します。
@param nth 文字の位置を表す整数を指定します。
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1) # => "e"
"hello".byt......eslice(-1) # => "o"
"\u3042".byteslice(0) # => "\xE3"
"\u3042".byteslice(1) # => "\x81"
//}
@see String#slice...