1125件ヒット
[1-100件を表示]
(0.093秒)
別のキーワード
ライブラリ
- ビルトイン (207)
- erb (24)
- json (12)
-
json
/ add / exception (12) - logger (24)
-
minitest
/ unit (6) -
net
/ http (12) - optparse (48)
- rake (180)
-
rake
/ testtask (36) -
rubygems
/ source _ info _ cache (36) -
rubygems
/ specification (36) - strscan (468)
- uri (12)
クラス
-
ARGF
. class (48) - Binding (7)
- Dir (12)
- ERB (24)
- Exception (32)
-
Gem
:: SourceInfoCache (36) -
Gem
:: Specification (36) - IO (12)
- Logger (24)
- Method (12)
-
MiniTest
:: Unit (2) -
MiniTest
:: Unit :: TestCase (2) - Module (12)
-
Net
:: HTTPGenericRequest (12) - OptionParser (48)
-
Rake
:: Application (36) -
Rake
:: FileList (96) -
Rake
:: InvocationChain (12) -
Rake
:: TestTask (36) - String (60)
- StringScanner (468)
- TracePoint (24)
-
URI
:: Generic (12)
モジュール
-
Gem
:: InstallUpdateOptions (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) - Kernel (12)
-
MiniTest
:: Assertions (2) -
Rake
:: TaskManager (24)
キーワード
- << (12)
- [] (12)
-
_ _ name _ _ (1) -
beginning
_ of _ line? (12) - body (12)
- bol? (12)
- check (12)
-
check
_ until (12) - chr (12)
- clear (12)
- concat (12)
-
const
_ source _ location (12) -
datetime
_ format (12) - desc (12)
- empty? (12)
- encoding (12)
- eos? (12)
-
exception
_ details (1) - exist? (12)
- ext (12)
- formatter (12)
- getc (12)
- gets (36)
- gsub (12)
- gsub! (12)
- hash (12)
-
inplace
_ mode (12) - inspect (30)
-
install
_ update _ defaults _ str (12) -
is
_ a? (12) -
kind
_ of? (12) -
last
_ comment (12) -
last
_ description (12) -
latest
_ cache _ file (12) -
latest
_ system _ cache _ file (12) -
latest
_ user _ cache _ file (12) - length (12)
- location (1)
- match? (12)
- matched (12)
- matched? (12)
-
matched
_ size (12) -
mu
_ pp (1) - name (24)
-
original
_ dir (12) - parse (24)
- parse! (12)
- path (12)
- pathmap (12)
- pattern (12)
- peek (12)
- peep (12)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (12)
-
post
_ match (12) -
pre
_ match (12) - puke (1)
- rakefile (12)
- read (12)
- reset (12)
- rest (12)
- rest? (12)
-
rest
_ size (12) - restsize (12)
- result (12)
- run (1)
- scan (12)
-
scan
_ full (12) -
scan
_ until (12) -
search
_ full (12) - select (12)
-
set
_ backtrace (12) - size (12)
- skip (12)
-
skip
_ until (12) -
source
_ location (7) - src (12)
- string= (12)
- sub! (12)
- terminate (12)
-
test
_ file (12) -
test
_ files (12) -
test
_ suite _ file (12) -
to
_ a (12) -
to
_ json (24) -
to
_ s (30) - unscan (12)
検索結果
先頭5件
-
StringScanner
# string -> String (21311.0) -
スキャン対象にしている文字列を返します。
...quire 'strscan'
s = StringScanner.new('test string')
s.string # => "test string"
//}
返り値は freeze されていません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.string.frozen? # => false
//}
なお、このメソッドは StringScanner.new に渡......依存したコードを書かないようにしましょう。
//emlist[例][ruby]{
require 'strscan'
str = 'test string'
s = StringScanner.new(str)
s.string == str # => true
s.string.eql?(str) # => true (将来は false になる可能性がある)
//}
また、返り値の文字列に対し......ないでください。
//emlist[例][ruby]{
require 'strscan'
str = 'test string'
s = StringScanner.new(str)
s.string.replace("0123")
s.scan(/\w+/) # => "0123" (将来は "test" が返る可能性あり)
str # => "0123" (将来は "test string" が返る可能性あり)
//}... -
String
# chr -> String (9138.0) -
self の最初の文字だけを含む文字列を返します。
...値が Integer から String を返すように変更になりました。
Ruby 1.8 以前と1.9以降の互換性を保つために String#chr が存在します。
例:
# ruby 1.8 系では STDIN.getc が 116 を返すため Integer#chr が呼び出される
$ echo test | ruby -e "p STDIN.ge......tc.chr" # => "t"
# ruby 1.9 系以降では STDIN.getc が "t" を返すため String#chr が呼び出される
$ echo test | ruby -e "p STDIN.getc.chr" # => "t"
@see String#ord, Integer#chr... -
StringScanner
# string=(str) (9120.0) -
スキャン対象の文字列を str に変更して、マッチ記録を捨てます。
...す。
@param str スキャン対象の文字列を str に変更して、マッチ記録を捨てます。
@return str を返します。
//emlist[例][ruby]{
require 'strscan'
str = '0123'
s = StringScanner.new('test string')
s.string = str # => "0123"
s.scan(/\w+/) # => "0123"
//}... -
String
# length -> Integer (9019.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... -
String
# size -> Integer (9019.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... -
String
# hash -> Integer (9013.0) -
self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。
...self のハッシュ値を返します。
eql? で等しい文字列は、常にハッシュ値も等しくなります。
//emlist[例][ruby]{
"test".hash # => 4038258770210371295
("te" + "st").hash == "test".hash # => true
//}
@see Hash... -
String
# encoding -> Encoding (9007.0) -
文字列のエンコーディング情報を表現した Encoding オブジェクトを返します。
...列のエンコーディング情報を表現した Encoding オブジェクトを返します。
//emlist[例][ruby]{
# encoding: utf-8
utf8_str = "test"
euc_str = utf8_str.encode("EUC-JP")
utf8_str.encoding # => #<Encoding:UTF-8>
euc_str.encoding # => #<Encoding:EUC-JP>
//}
@see Encoding... -
Gem
:: Specification # test _ file -> String (6219.0) -
Gem::Specification#test_files の単数バージョンです。
...Gem::Specification#test_files の単数バージョンです。... -
Gem
:: Specification # test _ suite _ file -> String (6219.0) -
この属性は非推奨です。 Gem::Specification#test_files を使用してください。
...この属性は非推奨です。 Gem::Specification#test_files を使用してください。...