ライブラリ
- ビルトイン (261)
-
cgi
/ core (12) -
cgi
/ html (36) -
irb
/ context (48) -
irb
/ ext / save-history (12) -
rexml
/ document (72) -
rubygems
/ package / tar _ header (12) - scanf (36)
- socket (60)
クラス
-
ARGF
. class (24) - Binding (7)
-
Gem
:: Package :: TarHeader (12) - IO (12)
-
IRB
:: Context (60) - MatchData (4)
- Module (180)
- Object (12)
-
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: Element (24) -
REXML
:: Entity (12) - Refinement (4)
- Socket (24)
- String (36)
- Symbol (6)
- UDPSocket (36)
モジュール
-
CGI
:: HtmlExtension (36) -
CGI
:: QueryExtension (12) - Kernel (12)
-
REXML
:: Namespace (12)
キーワード
- === (24)
- a (24)
-
alias
_ method (12) - base (12)
- bind (12)
- captures (2)
- connect (12)
- deconstruct (2)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
deprecate
_ constant (12) -
history
_ file (12) -
import
_ methods (4) -
inplace
_ mode (12) - namespace (12)
- prefix (36)
- prefixes (24)
- private (48)
-
prompt
_ c (12) -
prompt
_ i (12) -
prompt
_ n (12) -
prompt
_ s (12) - protected (48)
- public (48)
- putc (12)
- referer (12)
- scanf (36)
- send (36)
-
source
_ location (7) -
start
_ with? (14)
検索結果
先頭5件
-
REXML
:: Entity # ref -> String | nil (18203.0) -
外部実体(external entity)宣言の URI を返します。
外部実体(external entity)宣言の URI を返します。
内部実体宣言の場合は nil を返します。 -
String
# delete _ prefix(prefix) -> String (15320.0) -
文字列の先頭から prefix を削除した文字列のコピーを返します。
...ら prefix を削除した文字列のコピーを返します。
@param prefix 先頭から削除する文字列を指定します。
@return 文字列の先頭から prefix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("llo")......# => "hello"
//}
@see String#delete_prefix!
@see String#delete_suffix
@see String#start_with?... -
String
# delete _ prefix!(prefix) -> self | nil (15219.0) -
self の先頭から破壊的に prefix を削除します。
...prefix を削除します。
@param prefix 先頭から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}
@see String#delete_prefi......x
@see String#delete_suffix!
@see String#start_with?... -
String
# start _ with?(*prefixes) -> bool (9149.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...の先頭が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?(......"ing", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
String
# scanf(format) -> Array (9025.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 (9025.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... -
CGI
:: QueryExtension # referer -> String (6202.0) -
ENV['HTTP_REFERER'] を返します。
...ENV['HTTP_REFERER'] を返します。... -
Gem
:: Package :: TarHeader # prefix -> String (6202.0) -
tar のヘッダに含まれる prefix を返します。
...tar のヘッダに含まれる prefix を返します。... -
REXML
:: Attribute # prefix -> String (6202.0) -
属性の名前空間を返します。
...t.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute.new( "x", "y" )
p a.prefix # -> ""
//}... -
REXML
:: Attributes # prefixes -> [String] (6202.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...self の中で宣言されている prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.......org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: Element # prefixes -> [String] (6202.0) -
self の文脈で定義されている prefix を文字列の配列を返します。
...る prefix を文字列の配列を返します。
対象の要素とその外側の要素で定義されている prefix を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].prefixes # =>...