別のキーワード
ライブラリ
- ビルトイン (1969)
- bigdecimal (12)
- csv (12)
- erb (12)
-
irb
/ cmd / help (12) - json (36)
-
json
/ add / struct (12) - kconv (12)
- mkmf (12)
-
net
/ http (84) - open-uri (60)
- optparse (180)
- pathname (24)
- rake (24)
-
rexml
/ document (180) -
rubygems
/ requirement (36) -
rubygems
/ specification (24) - stringio (86)
- strscan (132)
- uri (36)
-
webrick
/ httprequest (12) - win32ole (12)
クラス
- Array (21)
- BigDecimal (12)
- Binding (7)
- CSV (12)
- ERB (12)
-
Encoding
:: Converter (72) -
Encoding
:: InvalidByteSequenceError (12) -
Encoding
:: UndefinedConversionError (12) - Enumerator (24)
- Exception (8)
-
Gem
:: Requirement (36) -
Gem
:: Specification (24) - IO (16)
-
IRB
:: ExtendCommand :: Help (12) -
JSON
:: Parser (12) - MatchData (26)
- Method (12)
- Module (540)
-
Net
:: HTTPGenericRequest (36) - Object (51)
- OptionParser (132)
- Pathname (24)
- Proc (12)
-
REXML
:: Attribute (36) -
REXML
:: Attributes (36) -
REXML
:: CData (12) -
REXML
:: DocType (24) -
REXML
:: Document (36) -
REXML
:: Instruction (24) -
REXML
:: Text (12) -
Rake
:: FileList (24) - Range (33)
- Refinement (4)
- Regexp (24)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (94) - String (776)
- StringIO (86)
- StringScanner (132)
- Struct (60)
- Symbol (27)
-
Thread
:: Backtrace :: Location (12) - Time (12)
- TrueClass (24)
-
URI
:: MailTo (36) - UnboundMethod (96)
- UncaughtThrowError (11)
-
WEBrick
:: HTTPRequest (12) -
WIN32OLE
_ VARIANT (12)
モジュール
キーワード
- % (26)
- == (12)
- [] (36)
- []= (24)
-
_ dump (24) -
absolute
_ path (24) -
alias
_ method (12) -
arg
_ config (12) - arity (12)
-
as
_ list (12) - attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) -
attribute
_ of (12) - autoload (12)
- autoload? (12)
-
base
_ label (12) -
basic
_ auth (12) - body (12)
- bytes (7)
- byteslice (36)
- captures (12)
- casecmp (24)
- casecmp? (18)
- charset (24)
-
check
_ until (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (12)
- concat (9)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - content (12)
-
content
_ encoding (12) -
content
_ type (12) - convert (12)
- count (12)
- deconstruct (2)
- dedup (3)
-
default
_ argv (12) -
define
_ method (24) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
deprecate
_ constant (12) - disasm (12)
- disassemble (12)
- dump (12)
- dup (12)
- each (12)
-
each
_ byte (24) -
each
_ char (12) -
each
_ codepoint (12) -
each
_ grapheme _ cluster (16) -
each
_ line (24) - encode (36)
- encoding (12)
-
end
_ with? (6) - eql? (12)
-
error
_ bytes (12) -
error
_ char (12) - execute (12)
- fetch (12)
- finish (12)
-
force
_ encoding (12) -
get
_ byte (12) - getbyte (12)
- getch (12)
-
grapheme
_ clusters (16) - gsub (48)
- gsub! (60)
- headers (12)
-
import
_ methods (4) - include? (12)
-
insert
_ output (12) - inspect (67)
-
instance
_ method (12) - iseuc (12)
- label (12)
- length (12)
- lines (7)
- ljust (12)
- match? (12)
-
matched
_ size (12) - method (12)
-
method
_ defined? (12) -
module
_ function (36) - name (24)
-
named
_ captures (12) - namespace (12)
- namespaces (12)
- order! (48)
- pack (21)
- parse (24)
- parse! (24)
- path (24)
- permute (24)
- permute! (24)
- pread (8)
- prefix (12)
- prefixes (12)
- prepend (9)
-
pretty
_ print (12) - private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
proxy
_ basic _ auth (12) - public (24)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putback (24)
- puts (12)
- pwrite (8)
- query (12)
-
quote
_ char (12) -
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) - replacement= (12)
- result (12)
- rjust (12)
-
rubygems
_ version (12) -
scan
_ full (12) -
scan
_ until (12) - scrub (36)
- scrub! (36)
-
search
_ full (12) - size (12)
-
skip
_ until (12) - slice (12)
- slice! (12)
- source (24)
-
source
_ location (43) - squeeze (12)
- squeeze! (12)
-
stand
_ alone? (12) - status (12)
- step (19)
- strftime (12)
- sub (60)
- sub! (48)
-
sub
_ type (12) - succ (12)
- succ! (12)
- sum (12)
-
summary
_ indent (12) - target (12)
- then (7)
-
to
_ a (12) -
to
_ binary (10) -
to
_ json (36) -
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ ruby (12) -
to
_ s (71) -
to
_ string (12) - truncate (12)
-
undef
_ method (12) - undump (8)
- ungetc (12)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack (12)
- unpack1 (9)
- unscan (12)
- upcase (12)
- upcase! (12)
- upto (12)
- value (36)
-
values
_ at (12) - version (12)
-
with
_ object (24) -
yield
_ self (8)
検索結果
先頭5件
-
String
# grapheme _ clusters {|grapheme _ cluster| block } -> self (33456.0) -
文字列の書記素クラスタの配列を返します。(self.each_grapheme_cluster.to_a と同じです)
...f.each_grapheme_cluster.to_a と同じです)
//emlist[例][ruby]{
"a\u0300".grapheme_clusters # => ["à"]
//}
ブロックが指定された場合は String#each_grapheme_cluster と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は......削除されました。
@see String#each_grapheme_cluster... -
String
# delete _ suffix(suffix) -> String (33444.0) -
文字列の末尾から suffix を削除した文字列のコピーを返します。
...から suffix を削除した文字列のコピーを返します。
@param suffix 末尾から削除する文字列を指定します。
@return 文字列の末尾から suffix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("he......l") # => "hello"
//}
@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?... -
String
# each _ grapheme _ cluster {|grapheme _ cluster| block } -> self (33437.0) -
文字列の書記素クラスタに対して繰り返します。
...。
String#each_char と違って、
Unicode Standard Annex #29 (https://unicode.org/reports/tr29/)
で定義された書記素クラスタに対して繰り返します。
//emlist[例][ruby]{
"a\u0300".each_char.to_a.size # => 2
"a\u0300".each_grapheme_cluster.to_a.size # => 1
//}
@see String#g......rapheme_clusters... -
String
# grapheme _ clusters -> [String] (33356.0) -
文字列の書記素クラスタの配列を返します。(self.each_grapheme_cluster.to_a と同じです)
...f.each_grapheme_cluster.to_a と同じです)
//emlist[例][ruby]{
"a\u0300".grapheme_clusters # => ["à"]
//}
ブロックが指定された場合は String#each_grapheme_cluster と同じように動作します。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は......削除されました。
@see String#each_grapheme_cluster... -
String
# delete _ suffix!(suffix) -> self | nil (33343.0) -
self の末尾から破壊的に suffix を削除します。
...uffix を削除します。
@param suffix 末尾から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => nil
//}
@see String#chomp!
@see St......ring#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see String#end_with?... -
String
# ljust(width , padding = & # 39; & # 39;) -> String (33326.0) -
長さ width の文字列に self を左詰めした文字列を返します。 self の長さが width より長い時には元の文字列の複製を返します。 また、第 2 引数 padding を指定したときは 空白文字の代わりに padding を詰めます。
...長さ width の文字列に self を左詰めした文字列を返します。
self の長さが width より長い時には元の文字列の複製を返します。
また、第 2 引数 padding を指定したときは
空白文字の代わりに padding を詰めます。
@param width 返......が width になるまで self の右側に詰める文字
//emlist[例][ruby]{
p "foo".ljust(10) # => "foo "
p "foo".ljust(9) # => "foo "
p "foo".ljust(8) # => "foo "
p "foo".ljust(2) # => "foo"
p "foo".ljust(1) # => "foo"
p "foo".ljust(10, "*"......) # => "foo*******"
//}
@see String#center, String#rjust... -
String
# rjust(width , padding = & # 39; & # 39;) -> String (33326.0) -
長さ width の文字列に self を右詰めした文字列を返します。 self の長さが width より長い時には元の文字列の複製を返します。 また、第 2 引数 padding を指定したときは 空白文字の代わりに padding を詰めます。
...長さ width の文字列に self を右詰めした文字列を返します。
self の長さが width より長い時には元の文字列の複製を返します。
また、第 2 引数 padding を指定したときは
空白文字の代わりに padding を詰めます。
@param width 返......が width になるまで self の左側に詰める文字
//emlist[例][ruby]{
p "foo".rjust(10) # => " foo"
p "foo".rjust(9) # => " foo"
p "foo".rjust(8) # => " foo"
p "foo".rjust(2) # => "foo"
p "foo".rjust(1) # => "foo"
p "foo".rjust(10, "*"......) # => "*******foo"
//}
@see String#center, String#ljust... -
String
# each _ grapheme _ cluster -> Enumerator (33237.0) -
文字列の書記素クラスタに対して繰り返します。
...。
String#each_char と違って、
Unicode Standard Annex #29 (https://unicode.org/reports/tr29/)
で定義された書記素クラスタに対して繰り返します。
//emlist[例][ruby]{
"a\u0300".each_char.to_a.size # => 2
"a\u0300".each_grapheme_cluster.to_a.size # => 1
//}
@see String#g......rapheme_clusters... -
String
# upto(max , exclusive = false) {|s| . . . } -> self (33229.0) -
self から始めて max まで 「次の文字列」を順番にブロックに与えて繰り返します。 「次」の定義については String#succ を参照してください。
...「次」の定義については String#succ を参照してください。
たとえば以下のコードは a, b, c, ... z, aa, ... az, ..., za を
出力します。
//emlist[][ruby]{
("a" .. "za").each do |str|
puts str
end
'a'.upto('za') do |str|
puts str
end
//}
@param max 繰り......返しをやめる文字列
@param exclusive max を含むかどうか。false の場合は max を含む。... -
String
# count(*chars) -> Integer (33213.0) -
chars で指定された文字が文字列 self にいくつあるか数えます。
...chars で指定された文字が文字列 self にいくつあるか数えます。
検索する文字を示す引数 chars の形式は tr(1) と同じです。
つまり、「"a-c"」は文字 a から c を意味し、
「"^0-9"」のように文字列の先頭が「^」の場合は
指定文......t[例][ruby]{
p 'abcdefg'.count('c') # => 1
p '123456789'.count('2378') # => 4
p '123456789'.count('2-8', '^4-6') # => 4
# ファイルの行数を数える
n_lines = File.read("foo").count("\n")
# ファイルの末尾に改行コードがない場合にも対処する
bu......f = File.read("foo")
n_lines = buf.count("\n")
n_lines += 1 if /[^\n]\z/ =~ buf
# if /\n\z/ !~ buf だと空ファイルを 1 行として数えてしまうのでダメ
//}... -
String
# unpack(template) -> Array (31795.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...ート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテ......ト文字のシステム依存性
各テンプレート文字の説明の中で、
short や long はシステムによらずそれぞれ 2, 4バイトサ
イズの数値(32ビットマシンで一般的なshort, longのサイズ)を意味していま
す。s, S, l, L に対しては直後に _ ま......テム依存の short, long のサイズにすることもできます。
i, I (int)のサイズは常にシステム依存であり、n, N, v, V
のサイズは常にシステム依存ではない(!をつけられない)ことに注意してください。
つまり、IO#ioctl などで C の構...