2148件ヒット
[1-100件を表示]
(0.043秒)
ライブラリ
- ビルトイン (1000)
- bigdecimal (12)
- csv (36)
- ipaddr (12)
-
irb
/ context (48) - matrix (24)
-
net
/ smtp (12) - openssl (12)
- optparse (12)
- ostruct (24)
- pp (24)
- rake (60)
-
rdoc
/ context (12) -
rdoc
/ markup (12) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ commands / lock _ command (12) -
rubygems
/ gem _ path _ searcher (24) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ source _ index (24) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (444) - scanf (48)
- set (14)
-
shell
/ filter (6) - socket (24)
- strscan (12)
- uri (24)
- win32ole (12)
- zlib (12)
クラス
-
ARGF
. class (36) - Addrinfo (12)
- Array (24)
- BigDecimal (12)
- Bignum (6)
- Binding (7)
- CSV (12)
-
CSV
:: Row (12) -
CSV
:: Table (12) - Complex (12)
- Data (6)
- Dir (12)
- Encoding (24)
-
Encoding
:: Converter (12) -
Enumerator
:: ArithmeticSequence (7) -
Enumerator
:: Chain (7) - Exception (12)
- FalseClass (24)
- Fixnum (6)
- Float (24)
-
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: Commands :: LockCommand (12) -
Gem
:: GemPathSearcher (24) -
Gem
:: RemoteFetcher (12) -
Gem
:: SourceIndex (24) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (444) - Hash (24)
- IPAddr (12)
-
IRB
:: Context (48) - Integer (24)
- MatchData (16)
- Matrix (12)
- Method (24)
- Module (216)
-
Net
:: SMTP (12) - Object (54)
-
OpenSSL
:: HMAC (12) - OpenStruct (24)
-
OptionParser
:: ParseError (12) - Proc (24)
-
Process
:: Status (12) -
RDoc
:: Context :: Section (12) -
RDoc
:: Markup (12) -
RDoc
:: Options (12) -
Rake
:: FileList (12) -
Rake
:: Task (12) -
Rake
:: TaskArguments (24) - Range (12)
- Rational (12)
- Regexp (12)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (12) -
Scanf
:: FormatSpecifier (12) -
Scanf
:: FormatString (24) - Set (20)
-
Shell
:: Filter (6) -
Socket
:: Ifaddr (12) - String (36)
- StringScanner (12)
- Struct (24)
- Symbol (12)
- Thread (20)
-
Thread
:: Backtrace :: Location (12) - Time (6)
- TracePoint (12)
- TrueClass (12)
- UnboundMethod (24)
- Vector (12)
-
WIN32OLE
_ TYPE (12) -
Zlib
:: GzipFile :: Error (12)
オブジェクト
- ENV (12)
キーワード
-
$ -0 (12) -
$ -F (12) -
$ -I (12) -
$ -i (12) -
$ / (12) -
$ : (12) -
$ ; (12) -
$ LOAD _ PATH (12) - === (24)
- Encoding (12)
-
NO
_ INSPECTING _ IVARS (12) - Regexp (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Rubyの起動 (12)
- Ruby用語集 (12)
- SPECIAL (12)
- SPECIFIERS (6)
-
_ _ inspect _ _ (12) -
_ dump (12) - ` (12)
-
add
_ special (12) -
alias
_ method (12) - autorequire (12)
- bindir (12)
-
cache
_ dir (12) - captures (2)
-
decode
_ www _ form (12) - deconstruct (2)
-
default
_ executable (12) -
default
_ internal (12) -
deprecate
_ constant (12) - description (12)
- dir (12)
- download (12)
- email (12)
-
encode
_ www _ form (12) - executable (12)
- executables (12)
- extensions (12)
-
extra
_ rdoc _ files (12) -
file
_ name (12) - files (12)
-
full
_ gem _ path (12) -
full
_ name (12) - homepage (12)
-
inplace
_ mode (12) - inspect (642)
-
inspect
_ sockaddr (12) -
installation
_ path (12) -
installed
_ spec _ directories (12) -
last
_ spec (6) -
last
_ spec _ tried (6) -
lib
_ dirs _ for (12) -
lib
_ files (12) -
loaded
_ from (12) -
mark
_ version (12) -
matched
_ string (6) -
matching
_ files (12) - name (24)
- normalize (12)
-
normalize
_ yaml _ input (12) -
original
_ name (12) -
original
_ platform (12) - pathmap (24)
- platform (12)
-
pretty
_ inspect (12) -
pretty
_ print _ inspect (12) -
print
_ dependencies (12) - private (48)
- protected (48)
- public (48)
-
re
_ string (6) -
require
_ path (12) -
require
_ paths (12) - rss (12)
-
ruby 1
. 8 . 4 feature (12) -
rubygems
_ version (12) - scanf (12)
-
signing
_ key (12) -
source
_ location (7) -
spec
_ count (6) -
spec
_ dirs (12) -
spec
_ path (12) - summary (12)
- tainted? (6)
-
test
_ file (12) -
test
_ files (12) -
test
_ suite _ file (12) -
to
_ ruby (12) -
to
_ s (193) -
trace
_ var (36) - trap (24)
- yaml (12)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- リテラル (12)
- 多言語化 (12)
- 正規表現 (12)
検索結果
先頭5件
-
String (38132.0)
-
文字列のクラスです。 ヌル文字を含む任意のバイト列を扱うことができます。 文字列の長さにはメモリ容量以外の制限はありません。
...ープシーケンスがほぼ無効)
"string\n" # ダブルクオート文字列 (エスケープシーケンスがすべて有効)
%q(str\\ing) # 「%q」文字列 (エスケープシーケンスがほぼ無効、デリミタが変えられる)
%Q(string\n) # 「%Q」文字列 (エスケープ......能
<<-End
この行はヒアドキュメント (終端記号をインデントできる)
End
//}
===[a:mutable] 破壊的な変更
Ruby の String クラスは mutable です。
つまり、オブジェクト自体を破壊的に変更できます。
「破壊的な変更」とは、ある......詳しく知りたい場合は、spec/m17n を参照してください。
==== 文字列同士の比較・結合
文字列同士の比較・結合などでは両者のエンコーディングを意識する必要があります。
例えば String#== や String#eql? は両者のエンコーディ......ブルクオートとの併用も可能
<<~End
この行のインデントは無視される
End
//}
===[a:mutable] 破壊的な変更
Ruby の String クラスは mutable です。
つまり、オブジェクト自体を破壊的に変更できます。
「破壊的な変更」とは、ある... -
String
# inspect -> String (27225.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
...ために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect # => "\t\r\n"
//}
@see String#dump... -
String
# pathmap(spec = nil) { . . . } -> String (21202.0) -
与えられた書式指定文字列に応じてパス(自身)を変換します。
与えられた書式指定文字列に応じてパス(自身)を変換します。
与えられた書式指定文字列は変換の詳細を制御します。
指定できる書式指定文字列は以下の通りです。
: %p
完全なパスを表します。
: %f
拡張子付きのファイル名を表します。ディレクトリ名は含まれません。
: %n
拡張子なしのファイル名を表します。
: %d
パスに含まれるディレクトリのリストを表します。
: %x
パスに含まれるファイルの拡張子を表します。拡張子が無い場合は空文字列を表します。
: %X
拡張子以外すべてを表します。
: %s
定義されていれば、代替のファイルセパレータを表します。... -
String
# scanf(format) -> Array (21018.0) -
ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。
...il], ["abc", 456], ["def", nil]]
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]......%a
: %A
符号付き浮動小数点数
: %s
空白文字を含まない文字列
(幅が指定されているときは指定された文字数か空白文字の直前までの短い方)
: %c
1文字(幅が指定されているときは指定された文字数)
: [...]
d:spec/regexp#string... -
String
# scanf(format) {|*ary| . . . } -> Array (21018.0) -
ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。
...il], ["abc", 456], ["def", nil]]
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]......%a
: %A
符号付き浮動小数点数
: %s
空白文字を含まない文字列
(幅が指定されているときは指定された文字数か空白文字の直前までの短い方)
: %c
1文字(幅が指定されているときは指定された文字数)
: [...]
d:spec/regexp#string... -
StringScanner
# inspect -> String (9213.0) -
StringScannerオブジェクトを表す文字列を返します。
...StringScannerオブジェクトを表す文字列を返します。
文字列にはクラス名の他、以下の情報が含まれます。
* スキャナポインタの現在位置。
* スキャン対象の文字列の長さ。
* スキャンポインタの前後にある文字。......//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.inspect # => "#<StringScanner 0/11 @ \"test ...\">"
s.scan(/\w+/) # => "test"
s.inspect # => "#<StringScanner 4/11 \"test\" @ \" stri...\">"
s.s......can(/\s+/) # => " "
s.inspect # => "#<StringScanner 5/11 \"test \" @ \"strin...\">"
s.scan(/\w+/) # => "string"
s.inspect # => "#<StringScanner fin>"
//}... -
Scanf
:: FormatSpecifier # matched _ string (9101.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # re _ string (9101.0) -
@todo
@todo -
Scanf
:: FormatString # last _ spec (9101.0) -
@todo
@todo -
Scanf
:: FormatString # last _ spec _ tried (9101.0) -
@todo
@todo -
Scanf
:: FormatString # spec _ count (9101.0) -
@todo
@todo -
Scanf
:: FormatString :: SPECIFIERS (9100.0) -
@todo
@todo -
UnboundMethod
# inspect -> String (6214.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect...