別のキーワード
種類
ライブラリ
- ビルトイン (5233)
- abbrev (24)
- base64 (24)
- benchmark (24)
- bigdecimal (60)
-
cgi
/ core (12) - csv (276)
- digest (72)
- erb (72)
- etc (24)
-
irb
/ cmd / help (12) - json (276)
-
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) - kconv (12)
- logger (12)
- mkmf (12)
-
net
/ http (132) - objspace (24)
- open-uri (2)
- open3 (12)
- openssl (648)
- optparse (396)
- pathname (36)
- psych (91)
- rake (24)
- rbconfig (12)
- readline (12)
- resolv (24)
-
rexml
/ document (156) -
ripper
/ lexer (36) -
rubygems
/ installer (12) -
rubygems
/ requirement (12) - securerandom (8)
- socket (36)
- stringio (340)
- strscan (324)
-
test
/ unit (1) - uri (134)
- win32ole (72)
クラス
-
ARGF
. class (84) - Array (81)
- BasicObject (12)
-
Benchmark
:: Tms (12) - BigDecimal (72)
- CGI (12)
- CSV (216)
-
CSV
:: Table (36) - Complex (12)
- Data (6)
- Date (12)
- DateTime (12)
-
Digest
:: Base (60) - Dir (143)
- ERB (24)
- Encoding (24)
-
Encoding
:: Converter (144) -
Encoding
:: InvalidByteSequenceError (12) - Enumerator (24)
- Exception (44)
- File (148)
- Float (24)
-
Gem
:: Installer (12) -
Gem
:: Requirement (12) - IO (196)
- IPSocket (12)
-
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
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: GeneralString (24) -
OpenSSL
:: ASN1 :: GraphicString (24) -
OpenSSL
:: ASN1 :: IA5String (24) -
OpenSSL
:: ASN1 :: ISO64String (24) -
OpenSSL
:: ASN1 :: NumericString (24) -
OpenSSL
:: ASN1 :: OctetString (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: ASN1 :: T61String (24) -
OpenSSL
:: ASN1 :: UTF8String (24) -
OpenSSL
:: ASN1 :: UniversalString (24) -
OpenSSL
:: ASN1 :: VideotexString (24) -
OpenSSL
:: BN (12) - OptionParser (348)
- Pathname (36)
- Proc (12)
-
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (12) -
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: CData (24) -
REXML
:: DocType (24) -
REXML
:: Element (24) -
REXML
:: Entity (24) -
REXML
:: Text (36) -
Rake
:: FileList (24) - Random (29)
- Range (90)
- Rational (36)
- Regexp (144)
- Resolv (24)
- Ripper (36)
- RubyVM (12)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (140) - Socket (24)
- String (1917)
- StringIO (340)
- StringScanner (324)
- Struct (84)
- Symbol (59)
- Thread (10)
-
Thread
:: Backtrace :: Location (72) - Time (24)
- TracePoint (43)
-
URI
:: MailTo (36) - UnboundMethod (60)
- WIN32OLE (12)
-
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIANT (24)
モジュール
- Abbrev (12)
- Base64 (24)
- Benchmark (12)
- Digest (12)
-
ERB
:: Util (48) - Etc (24)
-
GC
:: Profiler (12) - JSON (108)
-
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 :: String :: Extend (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kconv (12)
- Kernel (410)
- Marshal (48)
-
Net
:: HTTPHeader (96) - ObjectSpace (24)
- Open3 (12)
-
OpenSSL
:: ASN1 (312) -
OptionParser
:: Arguable (48) - Process (24)
- Psych (67)
- RbConfig (12)
- Readline (12)
-
RubyVM
:: AbstractSyntaxTree (10) - SecureRandom (8)
- Signal (24)
-
Test
:: Unit (1) - URI (98)
キーワード
-
$ -0 (12) -
$ -F (12) -
$ -I (12) -
$ / (12) -
$ : (12) -
$ ; (12) -
$ LOAD _ PATH (12) -
$ _ (12) - % (26)
- * (36)
- + (12)
- +@ (10)
- -@ (10)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (24)
- <=> (24)
- == (24)
- === (48)
- =~ (40)
- ASN1 (12)
- BMPString (24)
- BitString (24)
- Complex (12)
- Encoding (12)
- FORMAT (24)
- Float (12)
- GeneralString (24)
- GraphicString (24)
- IA5String (24)
-
INSTRUCTION
_ NAMES (12) - ISO64String (24)
- Integer (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NumericString (24)
- OctetString (24)
- PrintableString (24)
- RSTRING (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- T61String (24)
- UTF8String (24)
- UniversalString (24)
- VideotexString (24)
- [] (252)
- []= (108)
-
_ _ id _ _ (12) -
_ dump (24) - ` (12)
- abbrev (24)
-
absolute
_ path (36) -
add
_ element (12) -
alias
_ method (12) -
allocation
_ sourcefile (12) - alphanumeric (8)
-
arg
_ config (12) - argv0 (12)
-
asciicompat
_ encoding (24) - attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) -
attribute
_ of (12) - autoload (24)
- autoload? (24)
- backtrace (12)
-
base
_ label (24) - basename (12)
-
basic
_ auth (12) - binread (24)
- binwrite (12)
- body (12)
- byteindex (3)
- byterindex (3)
- bytes (57)
- bytesize (12)
- byteslice (36)
- caller (36)
- capitalize (12)
- capitalize! (12)
- captures (12)
- casecmp (24)
- casecmp? (18)
- center (12)
- charpos (12)
- chars (24)
- check (12)
-
check
_ until (12) - children (23)
- chomp (24)
- chomp! (12)
- chop (24)
- chop! (12)
- chr (36)
- class (12)
-
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clear (12)
- clone (12)
- codepage (12)
- codepoints (24)
- coerce (12)
-
col
_ sep (12) - compile (12)
-
compile
_ option (12) - concat (33)
- confstr (12)
- connect (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - convert (12)
- count (12)
-
count
_ objects _ size (12) - cover? (19)
-
create
_ id (12) - crypt (12)
-
datetime
_ format (12) -
decode
_ www _ form _ component (12) - deconstruct (2)
- dedup (3)
-
default
_ argv (12) - define (6)
-
define
_ method (24) -
define
_ singleton _ method (24) - delete (48)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
deprecate
_ constant (12) - digest (12)
- digest! (12)
- dirname (12)
- disasm (24)
- disassemble (24)
- downcase (12)
- downcase! (12)
- dump (68)
-
dump
_ stream (12) - dup (12)
- each (24)
-
each
_ byte (48) -
each
_ char (24) -
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (48) - encode (43)
- encode! (24)
- encode64 (12)
-
encode
_ www _ form _ component (12) - encoding (12)
-
end
_ with? (18) - entity (12)
- entries (24)
- environment (12)
- eql? (24)
-
error
_ bytes (12) - escape (19)
-
eval
_ script (7) - execute (12)
- exist? (12)
- ext (12)
- extname (12)
- extract (48)
-
fast
_ generate (12) -
fast
_ unparse (12) - fetch (36)
- filter (36)
- find (12)
- finish (12)
-
for
_ fd (12) -
force
_ encoding (12) - format (12)
-
formatted
_ program _ filename (12) - freeze (12)
- ftype (12)
- generate (24)
-
generate
_ line (12) -
get
_ fields (12) - getaddress (24)
- getaddrinfo (12)
- getbyte (24)
- getc (24)
- getname (12)
- gets (72)
- getwd (12)
- glob (24)
-
grapheme
_ clusters (16) - gsub (84)
- gsub! (48)
- h (12)
- hash (24)
- header (12)
- headers (12)
- helpfile (12)
- hex (12)
- hexdigest (12)
- hexdigest! (12)
- hexencode (12)
- home (24)
-
html
_ escape (12) - include? (12)
- indent= (12)
- index (12)
-
inplace
_ mode (12) - insert (12)
-
insert
_ output (12) - inspect (163)
- instance (24)
-
instance
_ method (12) - isjis (12)
- join (24)
-
json
_ create (12) - label (24)
-
last
_ match (24) - length (12)
- lex (12)
- lines (38)
- ljust (12)
- load (12)
-
load
_ from _ binary _ extra _ data (10) -
locale
_ charmap (12) - logger (12)
- lstrip (12)
- match (24)
- match? (30)
- matches? (12)
- method (12)
-
method
_ defined? (12) -
module
_ function (36) - name (17)
- name= (10)
- namespace (12)
- new (511)
- next! (12)
-
object
_ nl= (12) - oct (12)
- on (144)
- open (98)
- ord (24)
- order (48)
- order! (48)
- pack (21)
- pack テンプレート文字列 (12)
- parse (34)
- parse! (24)
-
parse
_ csv (12) - partition (12)
- path (68)
- pathmap (12)
- peek (12)
- peep (12)
- permute (24)
- permute! (24)
- pipeline (12)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (24)
-
post
_ match (12) - pp (12)
-
pre
_ match (12) - pread (8)
- prepend (21)
-
pretty
_ generate (12) -
pretty
_ print (12) -
pretty
_ unparse (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)
- pwd (12)
- pwrite (8)
- quote (12)
-
quote
_ char (12) -
raw
_ seed (2) - read (24)
-
read
_ body (24) - readbyte (12)
- readchar (24)
- readline (48)
- readlines (96)
- readlink (12)
- realpath (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) - reopen (24)
- replacement (12)
- replacement= (12)
- reset (12)
- restore (12)
- result (24)
- rindex (12)
- rjust (12)
-
row
_ sep (12) - rpartition (12)
- rstrip (12)
- rstrip! (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
rubygems
/ security (12) -
safe
_ load (19) - scan (36)
-
scan
_ full (12) -
scan
_ until (12) - scrub (36)
- scrub! (36)
-
search
_ full (12) -
set
_ backtrace (12) - setbyte (12)
- setproctitle (12)
-
setup
_ argv (1) - shift (12)
-
singleton
_ class (12) -
singleton
_ method (12) - size (12)
- skip (12)
-
skip
_ until (12) - slice (84)
-
source
_ location (36) - space= (12)
-
space
_ before= (12) - split (55)
- sprintf (12)
- squeeze (12)
- squeeze! (12)
- src (12)
-
start
_ with? (18) - step (21)
- store (12)
- strftime (12)
- string= (12)
- strip (12)
- strip! (12)
- sub (84)
- 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 (240) -
to
_ mailtext (12) -
to
_ path (8) -
to
_ r (12) -
to
_ rfc822text (12) -
to
_ s (204) -
to
_ str (12) - tokenize (24)
- tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - trace (12)
-
trace
_ var (36) - trap (24)
- truncate (12)
-
try
_ convert (12) - typelibs (12)
- u (12)
- uname (12)
-
undef
_ method (12) - undump (8)
- ungetc (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - union (12)
- unnormalize (12)
- unpack (12)
- unpack1 (9)
- unparse (12)
- unscan (12)
-
untrace
_ var (12) - upcase (12)
- upcase! (12)
- upto (12)
- urandom (8)
-
url
_ encode (12) -
urlsafe
_ encode64 (12) - using (12)
- value (36)
-
values
_ at (12) -
with
_ object (24) - write (36)
- yaml (12)
-
yield
_ self (16) - クラス/メソッドの定義 (12)
- パターンマッチ (12)
- リテラル (11)
- 多言語化 (12)
検索結果
先頭5件
-
String
# -@ -> String | self (27226.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_t......ext # => true
original_text.equal?(frozen_text) # => false
original_text = "text".freeze
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => true
//}
@see String#+@... -
String
# +@ -> String | self (27225.0) -
self が freeze されている文字列の場合、元の文字列の複製を返します。 freeze されていない場合は self を返します。
...文字列の場合、元の文字列の複製を返します。
freeze されていない場合は self を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
unfrozen_text = +original_text
unfrozen_text.frozen? # => false
original_text == unf......_text # => true
original_text.equal?(unfrozen_text) # => true
original_text = "text".freeze
unfrozen_text = +original_text
unfrozen_text.frozen? # => false
original_text == unfrozen_text # => true
original_text.equal?(unfrozen_text) # => false
//}
@see String#-@... -
String
# -@ -> String | self (27225.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_t......ext # => true
original_text.equal?(frozen_text) # => false
original_text = "text".freeze
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => true
//}
@see String#+@... -
rubygems
/ security (26222.0) -
このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
...このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
=== 署名付きの Gem パッケージ
==== 目次
* 概要
* 解説
* コマンドラインオプション
* OpenSSL リファレンス
* Bugs / TODO
* 作者について
==== 概......ライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
以下のセクションでは、署名付きの Gem パッケージを作成する方法を
ステップバイステップで解説しています。
==== 解説
@todo メソッドではない
あ......追加します。
-l, --list 信頼している証明書のリストを表示します。
-r, --remove STRING STRING を含む証明書を削除します。
-b, --build EMAIL_ADDR EMAIL_ADDR に対する秘密鍵や自己署名証明書... -
String
# dedup -> String | self (24126.0) -
self が freeze されている文字列の場合、self を返します。 freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
...freeze されていない場合は元の文字列の freeze された (できる限り既存の) 複製を返します。
//emlist[例][ruby]{
# frozen_string_literal: false
original_text = "text"
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_t......ext # => true
original_text.equal?(frozen_text) # => false
original_text = "text".freeze
frozen_text = -original_text
frozen_text.frozen? # => true
original_text == frozen_text # => true
original_text.equal?(frozen_text) # => true
//}
@see String#+@... -
String
# unpack(template) -> Array (21666.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...アンパックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文......明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。
: a
ASCII文字列(ヌル文字を詰める/後続するヌル文字やスペースを残す)
//emlist[][ruby]{
["abc"].pack("a") # =......"abc ".unpack("a4") # => ["abc "]
//}
: A
ASCII文字列(スペースを詰める/後続するヌル文字やスペースを削除)
//emlist[][ruby]{
["abc"].pack("A") # => "a"
["abc"].pack("A*") # => "abc"
["abc"].pack("A4") # => "abc "
"abc ".unpack("A4") # => ["abc"]
"abc\0".unpack(......ックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレ... -
String
. new(string = "" , encoding: string . encoding , capacity: string . bytesize) -> String (21509.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...
string と同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクト......せん)。省略した場合は引数 string のエンコーディングと同
じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@param capacity 内部バッファのサイズを指......合、引数stringのバイト数が127未満であれば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text)... -
String
. new(string = "" , encoding: string . encoding , capacity: 127) -> String (21409.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...
string と同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクト......せん)。省略した場合は引数 string のエンコーディングと同
じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@param capacity 内部バッファのサイズを指......合、引数stringのバイト数が127未満であれば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text)... -
String
. new(string = "" , encoding: string . encoding , capacity: 63) -> String (21409.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...
string と同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクト......せん)。省略した場合は引数 string のエンコーディングと同
じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@param capacity 内部バッファのサイズを指......合、引数stringのバイト数が127未満であれば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text)... -
String
. new(string = "" , encoding: string . encoding) -> String (21381.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...
string と同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクト......数 string のエンコーディングと同
じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります)。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text......= "hoge".encode("EUC-JP")
no_option = String.new(text) # => "hoge"
no_option.encoding == Encoding::EUC_JP # => true
with_encoding = String.new(text, encoding: "UTF-8") # => "hoge"
with_encoding.encoding == Encoding::UTF_8 # => true
/... -
String
# partition(sep) -> [String , String , String] (21333.0) -
セパレータ sep が最初に登場する部分で self を 3 つに分割し、 [最初のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
...。
@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".partition("x") # => ["a", "x", "axa"]
p "aaaaa".partition("x") # => ["aaaaa", "", ""]
p "aaaaa".partition("") # => ["", "", "aaaaa"]
//}
@see String#rpartition, String#spl... -
String
# rpartition(sep) -> [String , String , String] (21333.0) -
セパレータ sep が最後に登場する部分で self を 3 つに分割し、 [最後のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
...と第 2 要素が空文字列になります。
@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".rpartition("x") # => ["axa", "x", "a"]
p "aaaaa".rpartition("x") # => ["", "", "aaaaa"]
//}
@see String#partition, String#split... -
String
# %(args) -> String (21323.0) -
printf と同じ規則に従って args をフォーマットします。
...す。
それ以外の場合は Kernel.#sprintf(self, args) と同じです。
@param args フォーマットする値、もしくはその配列
@return フォーマットされた文字列
//emlist[例][ruby]{
p "i = %d" % 10 # => "i = 10"
p "i = %x" % 10 # => "i = a"
p "......= 0xa"
p "i = %#o" % 10 # => "i = 012"
p "%d" % 10 # => "10"
p "%d,%o" % [10, 10] # => "10,12"
//}
=== sprintf フォーマット
Ruby の sprintf フォーマットは基本的に C 言語の sprintf(3)
のものと同じです。ただし、short や long などの C 特有の......。文字そのものを出力します。
//emlist[][ruby]{
p sprintf("%c", 97) #=> "a"
p sprintf("%c", 'a') #=> "a"
//}
フラグ `-' と幅 の指定だけが意味を持ちます。
: s
文字列を出力します。
引数が String オブジェクトでなければ to_s メソッドに...