123件ヒット
[101-123件を表示]
(0.042秒)
ライブラリ
- ビルトイン (123)
キーワード
- capitalize (12)
- capitalize! (12)
- downcase! (12)
- eql? (3)
- swapcase (12)
- swapcase! (12)
-
to
_ s (12) -
to
_ str (12) - upcase (12)
- upcase! (12)
検索結果
先頭4件
-
String
# capitalize!(*options) -> self | nil (21050.0) -
文字列先頭の文字を大文字に、残りを小文字に破壊的に変更します。
...。
@param options オプションの詳細は String#downcase を参照してください。
@return capitalize! は self を変更して返しますが、
変更が起こらなかった場合は nil を返します。
//emlist[例][ruby]{
str = "foobar"
str.capitalize!
p str # => "Foo......bar"
str = "fooBAR"
str.capitalize!
p str # => "Foobar"
//}
@see String#capitalize, String#upcase!,
String#downcase!, String#swapcase!... -
String
# swapcase!(*options) -> self | nil (21050.0) -
大文字を小文字に、小文字を大文字に破壊的に変更します。
...ションの詳細は String#downcase を参照してください。
swapcase! は self を変更して返しますが、
置換が起こらなかった場合は nil を返します。
このメソッドはマルチバイト文字を認識しません。
//emlist[例][ruby]{
str = "ABCxyz"
str.sw......apcase!
p str # => "abcXYZ"
//}
@see String#swapcase, String#upcase!, String#downcase!, String#capitalize!... -
String
# capitalize! -> self | nil (21038.0) -
文字列先頭の文字を大文字に、残りを小文字に変更します。 ただし、アルファベット以外の文字は位置に関わらず変更しません。
...ますが、
変更が起こらなかった場合は 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
# swapcase! -> self | nil (21038.0) -
'A' から 'Z' までのアルファベット大文字を小文字に、 'a' から 'z' までのアルファベット小文字を大文字に、破壊的に変更します。
...すが、
置換が起こらなかった場合は nil を返します。
このメソッドはマルチバイト文字を認識しません。
//emlist[例][ruby]{
str = "ABCxyz"
str.swapcase!
p str # => "abcXYZ"
//}
@see String#swapcase, String#upcase!, String#downcase!, String#capitalize!...