29件ヒット
[1-29件を表示]
(0.215秒)
ライブラリ
- ビルトイン (7)
-
rexml
/ document (22)
クラス
-
REXML
:: Attributes (11) -
REXML
:: Element (11) - String (7)
検索結果
先頭3件
-
REXML
:: Attributes # prefixes -> [String] (21238.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...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] (21220.0) -
self の文脈で定義されている 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 # => ["x", "y"]
//}... -
String
# start _ with?(*prefixes) -> bool (9224.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "st......r") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!...