59件ヒット
[1-59件を表示]
(0.108秒)
種類
- インスタンスメソッド (48)
- ライブラリ (11)
ライブラリ
- ビルトイン (48)
キーワード
- capitalize (8)
- capitalize! (8)
- downcase! (8)
- getoptlong (11)
- swapcase! (8)
- upcase! (8)
検索結果
先頭5件
-
Symbol
# upcase(*options) -> Symbol (21320.0) -
小文字を大文字に変換したシンボルを返します。
...小文字を大文字に変換したシンボルを返します。
(self.to_s.upcase.intern と同じです。)
:foo.upcase #=> :FOO
@see String#upcase... -
String
# upcase!(*options) -> self | nil (6320.0) -
全ての小文字を対応する大文字に破壊的に置き換えます。 どの文字がどう置き換えられるかは、オプションの有無や文字列のエンコーディングに依存します。
...ディングに依存します。
@param options オプションの詳細は String#downcase を参照してください。
//emlist[例][ruby]{
buf = "stRIng? STring."
buf.upcase!
p buf # => "STRING? STRING."
//}
@see String#upcase, String#downcase!,
String#swapcase!, String#capitalize!... -
String
# capitalize!(*options) -> self | nil (6213.0) -
文字列先頭の文字を大文字に、残りを小文字に破壊的に変更します。
...ます。
@param options オプションの詳細は String#downcase を参照してください。
@return capitalize! は self を変更して返しますが、
変更が起こらなかった場合は nil を返します。
//emlist[例][ruby]{
str = "foobar"
str.capitalize!
p str # =......> "Foobar"
str = "fooBAR"
str.capitalize!
p str # => "Foobar"
//}
@see String#capitalize, String#upcase!,
String#downcase!, String#swapcase!... -
String
# capitalize(*options) -> String (6213.0) -
文字列先頭の文字を大文字に、残りを小文字に変更した文字列を返します。
...。
@param options オプションの詳細は String#downcase を参照してください。
//emlist[例][ruby]{
p "foobar--".capitalize # => "Foobar--"
p "fooBAR--".capitalize # => "Foobar--"
p "FOOBAR--".capitalize # => "Foobar--"
//}
@see String#capitalize!, String#upcase,
String#... -
getoptlong (6030.0)
-
getoptlong は、GNU の getopt_long() とまったく同じ方式でコマンド 行オプションの解析を行う Ruby のライブラリです。
...getoptlong は、GNU の getopt_long() とまったく同じ方式でコマンド
行オプションの解析を行う Ruby のライブラリです。
=== GNU getopt_long() とは?
GNU getopt_long() は、コマンド行オプションの解析を行う C の関数です。多
くの GNU ソフ......mand [option...]
Options:
-m SIZE --max-size SIZE Set maximum size
-q --quiet --silence Suppress all warnings
--help Output this help, then exit
--version Output version number, then exit
まず、`getoptlong.rb' を Ruby......rg|
eval "$OPT_#{name.sub(/^--/, '').gsub(/-/, '_').upcase} = '#{arg}'"
end
rescue
exit(1)
end
each_option メソッドは、常にオプション名を「正式名 (canonical name)」
の形で返してきます。「正式名」とは、`set_options' へ渡した... -
String
# downcase!(*options) -> self | nil (213.0) -
全ての大文字を対応する小文字に破壊的に置き換えます。 どの文字がどう置き換えられるかは、オプションの有無や文字列のエンコーディングに依存します。
...am options オプションの詳細は String#downcase を参照してください。
@return self を変更して返します。変更が無かった場合は nil を返します。
//emlist[例][ruby]{
str = "STRing?"
str.downcase!
p str # => "string?"
//}
@see String#downcase, String#upcase!,......String#swapcase!, String#capitalize!... -
String
# swapcase!(*options) -> self | nil (213.0) -
大文字を小文字に、小文字を大文字に破壊的に変更します。
...。
@param options オプションの詳細は String#downcase を参照してください。
swapcase! は self を変更して返しますが、
置換が起こらなかった場合は nil を返します。
このメソッドはマルチバイト文字を認識しません。
//emlist[例][ru......by]{
str = "ABCxyz"
str.swapcase!
p str # => "abcXYZ"
//}
@see String#swapcase, String#upcase!, String#downcase!, String#capitalize!...