ライブラリ
- ビルトイン (230)
-
cgi
/ core (11) -
cgi
/ html (33) -
irb
/ context (55) -
irb
/ ext / save-history (11) -
rexml
/ document (66) - rubygems (11)
-
rubygems
/ package / tar _ header (11) - scanf (36)
- socket (132)
- tmpdir (22)
-
webrick
/ accesslog (11)
クラス
-
ARGF
. class (22) - Binding (6)
- Dir (22)
-
Gem
:: Package :: TarHeader (11) - IO (23)
-
IRB
:: Context (55) - Module (96)
- Object (11)
-
REXML
:: Attribute (11) -
REXML
:: Attributes (11) -
REXML
:: Element (22) -
REXML
:: Entity (11) - Refinement (3)
- Socket (99)
- String (33)
- Symbol (5)
- UDPSocket (33)
モジュール
-
CGI
:: HtmlExtension (33) -
CGI
:: QueryExtension (11) - Gem (11)
- Kernel (56)
-
REXML
:: Namespace (11) -
WEBrick
:: AccessLog (11)
キーワード
- === (22)
- Context (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 3
. 0 . 0 (4) -
REFERER
_ LOG _ FORMAT (11) - Regexp (11)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- Rubyの起動 (11)
- Ruby用語集 (11)
- ` (11)
- a (22)
-
alias
_ method (11) - base (11)
- bind (11)
- binwrite (11)
- connect (11)
-
delete
_ prefix (7) -
delete
_ prefix! (7) -
deprecate
_ constant (5) - getaddrinfo (11)
-
history
_ file (11) -
import
_ methods (3) -
inplace
_ mode (11) - mktmpdir (22)
- namespace (11)
-
pack
_ sockaddr _ in (11) -
pack
_ sockaddr _ un (11) - prefix (44)
- prefixes (22)
- private (23)
-
prompt
_ c (11) -
prompt
_ i (11) -
prompt
_ n (11) -
prompt
_ s (11) - protected (23)
- public (23)
- putc (11)
- rdoc (11)
- referer (11)
-
ruby 1
. 6 feature (11) - scanf (36)
- send (33)
-
sockaddr
_ in (11) -
sockaddr
_ un (11) -
source
_ location (6) -
start
_ with? (12) -
trace
_ var (33) -
unpack
_ sockaddr _ in (11) -
unpack
_ sockaddr _ un (11) - クラス/メソッドの定義 (11)
- リテラル (11)
- 多言語化 (11)
- 正規表現 (11)
検索結果
先頭5件
-
String
# delete _ prefix(prefix) -> String (27319.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 (27218.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 (21148.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 (21024.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 (21024.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... -
REXML
:: Entity # ref -> String | nil (18202.0) -
外部実体(external entity)宣言の URI を返します。
外部実体(external entity)宣言の URI を返します。
内部実体宣言の場合は nil を返します。 -
CGI
:: QueryExtension # referer -> String (6201.0) -
ENV['HTTP_REFERER'] を返します。
...ENV['HTTP_REFERER'] を返します。... -
Gem
. # prefix -> String (6201.0) -
このライブラリがインストールされているディレクトリの親ディレクトリを返します。
このライブラリがインストールされているディレクトリの親ディレクトリを返します。 -
Gem
:: Package :: TarHeader # prefix -> String (6201.0) -
tar のヘッダに含まれる prefix を返します。
...tar のヘッダに含まれる prefix を返します。... -
REXML
:: Attribute # prefix -> String (6201.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] (6201.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] (6201.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 # =>...