別のキーワード
種類
ライブラリ
- English (48)
- ビルトイン (5050)
- abbrev (24)
- base64 (12)
- bigdecimal (36)
-
cgi
/ core (12) - csv (312)
- digest (72)
- erb (24)
- etc (24)
- fiddle (12)
-
irb
/ cmd / help (12) - json (132)
-
json
/ add / complex (12) -
json
/ add / exception (12) -
json
/ add / regexp (12) - logger (12)
- matrix (36)
- mkmf (12)
-
net
/ http (276) - objspace (24)
- open-uri (62)
- open3 (12)
- openssl (660)
- optparse (456)
- pathname (48)
- psych (91)
- rake (96)
-
rake
/ packagetask (36) - rbconfig (24)
- readline (12)
-
rexml
/ document (288) - ripper (12)
-
ripper
/ filter (24) -
ripper
/ lexer (72) - rubygems (24)
-
rubygems
/ gem _ path _ searcher (12) -
rubygems
/ installer (12) -
rubygems
/ platform (12) -
rubygems
/ requirement (36) -
rubygems
/ specification (24) -
rubygems
/ version (36) - securerandom (8)
- set (14)
- socket (48)
- stringio (268)
- strscan (384)
-
test
/ unit (1) - uri (134)
-
webrick
/ httprequest (12) -
webrick
/ httpservlet / cgihandler (12) - win32ole (60)
クラス
-
ARGF
. class (51) - Addrinfo (12)
- Array (129)
- BigDecimal (36)
- Binding (7)
- CGI (12)
- CSV (180)
-
CSV
:: FieldInfo (12) -
CSV
:: Row (12) -
CSV
:: Table (72) - Complex (36)
- Data (12)
-
Digest
:: Base (60) - Dir (143)
- ERB (12)
- Encoding (48)
-
Encoding
:: Converter (132) -
Encoding
:: InvalidByteSequenceError (12) - Exception (80)
- FalseClass (24)
- File (144)
-
File
:: Stat (24) - Float (24)
-
Gem
:: GemPathSearcher (12) -
Gem
:: Installer (12) -
Gem
:: Platform (12) -
Gem
:: Requirement (36) -
Gem
:: Specification (24) -
Gem
:: Version (24) - Hash (24)
- IO (190)
- IPSocket (12)
-
IRB
:: ExtendCommand :: Help (12) - Integer (48)
-
JSON
:: Parser (12) -
JSON
:: State (48) - Logger (12)
- MatchData (134)
- Matrix (24)
- Method (24)
- Module (432)
-
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (96) - NilClass (7)
- Object (183)
-
OpenSSL
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: GeneralString (24) -
OpenSSL
:: ASN1 :: GraphicString (24) -
OpenSSL
:: ASN1 :: IA5String (24) -
OpenSSL
:: ASN1 :: ISO64String (24) -
OpenSSL
:: ASN1 :: NumericString (24) -
OpenSSL
:: ASN1 :: OctetString (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: ASN1 :: T61String (24) -
OpenSSL
:: ASN1 :: UTF8String (24) -
OpenSSL
:: ASN1 :: UniversalString (24) -
OpenSSL
:: ASN1 :: VideotexString (24) -
OpenSSL
:: BN (12) - OptionParser (408)
- Pathname (48)
- Proc (36)
-
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (12) -
REXML
:: Attribute (36) -
REXML
:: Attributes (36) -
REXML
:: DocType (84) -
REXML
:: Element (60) -
REXML
:: Entity (24) -
REXML
:: Instruction (24) -
REXML
:: Text (12) -
Rake
:: Application (36) -
Rake
:: FileList (36) -
Rake
:: PackageTask (36) - Random (12)
- Range (61)
- Rational (12)
- Refinement (4)
- Regexp (180)
- Ripper (48)
-
Ripper
:: Filter (12) -
Ripper
:: Lexer (36) - RubyVM (12)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (72) - Set (20)
- SignalException (12)
- Socket (24)
- String (1709)
- StringIO (256)
- StringScanner (372)
- Struct (84)
- Symbol (53)
- Thread (20)
-
Thread
:: Backtrace :: Location (36) - Time (66)
- TracePoint (55)
- TrueClass (12)
-
URI
:: MailTo (36) - UnboundMethod (60)
- UncaughtThrowError (11)
- Vector (12)
-
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPServlet :: CGIHandler (12) - WIN32OLE (12)
-
WIN32OLE
_ TYPE (24) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIANT (12)
モジュール
- Abbrev (12)
- Base64 (12)
- Digest (12)
-
ERB
:: Util (12) - Etc (24)
- Fiddle (12)
-
GC
:: Profiler (12) - Gem (24)
- JSON (72)
- Kernel (578)
- Marshal (48)
-
Net
:: HTTPHeader (144) - ObjectSpace (24)
- Open3 (12)
- OpenSSL (12)
-
OpenSSL
:: ASN1 (312) -
OpenURI
:: Meta (60) -
OptionParser
:: Arguable (48) - Process (24)
- Psych (67)
-
Rake
:: TaskManager (24) - RbConfig (24)
- Readline (12)
-
RubyVM
:: AbstractSyntaxTree (10) - SecureRandom (8)
- Signal (24)
-
Test
:: Unit (1) - URI (98)
キーワード
-
$ & (12) -
$ & # 39; (12) -
$ -F (12) -
$ -I (6) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ : (6) -
$ ; (12) -
$ ARGV (12) -
$ LAST _ PAREN _ MATCH (12) -
$ LAST _ READ _ LINE (12) -
$ LOAD _ PATH (12) -
$ OUTPUT _ RECORD _ SEPARATOR (12) -
$ PROGRAM _ NAME (12) -
$ ` (12) -
$ topdir (12) - % (26)
- * (36)
- + (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- <=> (24)
- == (24)
- === (36)
- =~ (40)
- ASN1 (12)
- BMPString (24)
-
BUILD
_ RUBY _ PLATFORM (12) - BitString (24)
- CSV (12)
- Complex (12)
- Enumerator (12)
- Filter (12)
- Float (12)
- GeneralString (24)
- GraphicString (24)
- IA5String (24)
- ISO64String (24)
- Integer (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NumericString (24)
- OPTS (12)
- OctetString (24)
- Pretty (12)
- PrintableString (24)
- RUBY (12)
-
RUBY
_ COPYRIGHT (12) -
RUBY
_ DESCRIPTION (12) -
RUBY
_ ENGINE (12) -
RUBY
_ PLATFORM (12) - Regexp (12)
- RubyGemsPackageVersion (12)
- RubyGemsVersion (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Rubyの起動 (12)
- StringIO (12)
- StringScanner (12)
- StringValuePtr (12)
- Symbol (12)
- T61String (24)
- TOPDIR (12)
- UTF8String (24)
- UniversalString (24)
- VERSION (12)
- Version (12)
- VideotexString (24)
- [] (228)
- []= (84)
-
_ dump (24) - abbrev (24)
-
absolute
_ path (36) -
allocation
_ sourcefile (12) - alphanumeric (8)
- argv0 (12)
- arity (12)
-
as
_ list (12) -
asciicompat
_ encoding (24) - asctime (12)
-
attribute
_ of (12) - autoload (24)
- autoload? (12)
- backtrace (12)
- basename (12)
-
basic
_ auth (12) - bigdecimal (12)
- binread (24)
- binwrite (12)
- body (24)
- byteindex (3)
- byterindex (3)
- bytes (26)
- bytesize (12)
- caller (36)
- canonname (12)
- capitalize (12)
- capitalize! (12)
- captures (12)
- casecmp (24)
- casecmp? (18)
- center (12)
- charpos (12)
- charset (24)
- check (12)
-
check
_ until (12) - children (23)
- chomp (24)
- chomp! (12)
- chop (24)
- chop! (12)
- chr (36)
- class (12)
-
class
_ variable _ get (12) -
class
_ variable _ set (12) - clear (12)
- clone (24)
- closed? (12)
- code (12)
- codepage (12)
- codepoints (24)
-
col
_ sep (12) - compile (12)
-
compile
_ option (12) - concat (21)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - content (12)
-
content
_ encoding (12) -
content
_ type (24) - count (12)
-
count
_ objects _ size (12) - cover? (14)
- crypt (12)
- ctime (12)
-
decode
_ www _ form _ component (12) - deconstruct (2)
- dedup (3)
-
default
_ argv (12) - define (6)
-
define
_ method (24) - delete (24)
- delete! (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
deprecate
_ constant (12) - dev (12)
- digest (12)
- digest! (12)
- dirname (12)
- disasm (12)
- disassemble (12)
- downcase (12)
- downcase! (12)
- dump (72)
-
dump
_ stream (12) - dup (24)
- each (24)
-
each
_ byte (48) -
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (48) - empty? (24)
- encode (43)
- encode! (24)
-
encode
_ www _ form _ component (12) - entities (12)
- entity (24)
- entries (24)
- environment (12)
- eos? (12)
- eql? (24)
-
error
_ bytes (12) - escape (19)
-
eval
_ script (7) - execute (12)
- exist? (12)
-
external
_ id (12) - extname (12)
- extract (48)
-
fast
_ unparse (12) - fetch (36)
- filename (24)
- filter (36)
- find (12)
- finish (12)
-
for
_ fd (12) -
force
_ encoding (12) - format (12)
-
formatted
_ program _ filename (12) - freeze (12)
- ftype (24)
- generate (12)
-
generate
_ line (12) -
get
_ byte (12) -
get
_ fields (12) - getaddress (12)
- getaddrinfo (12)
- getbyte (12)
- getch (12)
- gethostname (12)
- gets (39)
- glob (24)
-
grapheme
_ clusters (16) - gsub (84)
- gsub! (60)
- hash (12)
- header (24)
- headers (12)
- help (12)
- helpfile (12)
- hex (12)
- hexdigest (12)
- hexdigest! (12)
- hexencode (12)
-
html
_ escape (12) -
http
_ version (12) -
import
_ methods (4) - index (12)
-
inplace
_ mode (12) - insert (12)
-
insert
_ output (12) - inspect (400)
- instance (24)
- intern (12)
- irb (12)
- join (12)
-
last
_ comment (12) -
last
_ description (12) -
last
_ match (24) - lex (24)
-
lib
_ dirs _ for (12) - lines (32)
- ljust (12)
- load (12)
-
locale
_ charmap (12) - lstrip (12)
- lstrip! (12)
-
main
_ type (12) - match (24)
- match? (30)
-
matched
_ size (12) - matches? (12)
- method (36)
-
module
_ function (36) - msg (12)
- name (53)
-
name
_ list (12) -
named
_ captures (12) - names (12)
- namespace (24)
- namespaces (24)
- new (498)
- next (12)
- next! (12)
- oct (12)
- on (144)
- open (98)
- ord (12)
- order (48)
- order! (48)
-
original
_ dir (12) - pack (21)
- pack テンプレート文字列 (12)
-
package
_ dir (12) -
package
_ dir _ path (12) - parse (46)
- parse! (24)
-
parse
_ csv (12) - partition (12)
- path (111)
- pathmap (12)
- peek (12)
- peep (12)
- permute (24)
- permute! (24)
- pipeline (12)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (24)
-
post
_ match (24) - pp (12)
-
pre
_ match (24) - pread (8)
- prefix (12)
- prefixes (24)
- prepend (21)
-
pretty
_ generate (12) -
pretty
_ print (12) -
pretty
_ unparse (12) - print (24)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) - progname (12)
-
program
_ name (12) -
protected
_ method _ defined? (12) -
proxy
_ basic _ auth (12) - public (60)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putback (24)
- puts (12)
- pwd (12)
- pwrite (8)
- query (12)
- quote (12)
- rakefile (12)
-
rb
_ compile _ string (12) -
rb
_ eval _ string _ protect (12) -
rb
_ jump _ tag (12) - rdoc (12)
- read (12)
-
read
_ body (24) - readline (24)
- readlines (84)
- readlink (12)
- realpath (12)
- release (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) - reopen (24)
- replace (12)
- replacement (12)
- replacement= (12)
- rest? (12)
-
rest
_ size (12) - restore (12)
- restsize (12)
- result (24)
- reverse (12)
- reverse! (12)
- rindex (12)
- rjust (12)
-
row
_ sep (12) - rpartition (12)
- rstrip (12)
- rstrip! (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ security (12) -
rubygems
_ version (12) -
safe
_ load (19) - scan (36)
-
scan
_ full (12) -
scan
_ until (12) - scrub (12)
- scrub! (12)
-
search
_ full (12) -
set
_ backtrace (12) - setproctitle (12)
-
setup
_ argv (1) - signm (12)
- skip (12)
-
skip
_ until (12) - slice (84)
- slice! (24)
- socket (12)
- source (24)
-
source
_ location (19) - space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - split (55)
- sprintf (12)
- sprintf フォーマット (12)
- squeeze (12)
- squeeze! (12)
-
start
_ with? (14) - status (12)
- step (21)
- strftime (12)
- string (12)
- strip (12)
- strip! (12)
- sub (84)
- sub! (48)
-
sub
_ type (12) - succ (12)
- succ! (12)
-
summary
_ indent (12) - swapcase (12)
- swapcase! (12)
- sysconfdir (12)
- system (12)
- systmpdir (12)
- tainted? (6)
- target (12)
- text (12)
-
to
_ a (24) -
to
_ c (12) -
to
_ csv (24) -
to
_ f (12) -
to
_ i (12) -
to
_ json (48) -
to
_ mailtext (12) -
to
_ path (27) -
to
_ rfc822text (12) -
to
_ ruby (12) -
to
_ s (342) -
to
_ str (24) -
to
_ string (12) -
to
_ sym (12) - tokenize (36)
- tr (12)
-
tr
_ s (12) -
tr
_ s! (12) - trace (12)
-
trace
_ var (36) - trap (24)
- typelibs (12)
- undump (8)
- ungetc (12)
- union (12)
- unnormalize (12)
- unpack (12)
- unpack1 (9)
- unparse (12)
- unscan (12)
-
untrace
_ var (12) - upcase (12)
- upcase! (12)
- upto (12)
-
urlsafe
_ encode64 (12) -
values
_ at (12) - ver (12)
- version (12)
- write (24)
- xpath (12)
- yaml (12)
- zone (12)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- リテラル (12)
- 多言語化 (12)
- 正規表現 (12)
検索結果
先頭5件
-
String (38324.0)
-
文字列のクラスです。 ヌル文字を含む任意のバイト列を扱うことができます。 文字列の長さにはメモリ容量以外の制限はありません。
...字列リテラルの例をいくつか示します。
//emlist[文字列リテラルの例][ruby]{
'str\\ing' # シングルクオート文字列 (エスケープシーケンスがほぼ無効)
"string\n" # ダブルクオート文字列 (エスケープシーケンスがすべて有効)
%q(st......も可能
<<-End
この行はヒアドキュメント (終端記号をインデントできる)
End
//}
===[a:mutable] 破壊的な変更
Ruby の String クラスは mutable です。
つまり、オブジェクト自体を破壊的に変更できます。
「破壊的な変更」とは、......列のすべての文字を破壊的に大文字へ変更する
String#upcase! メソッドの使用例を以下に示します。
//emlist[例:String#upcase!][ruby]{
a = "string"
b = a
a.upcase!
p a # => "STRING"
p b # => "STRING"
//}
この例では、a に対してメソッドを呼んだ......ダブルクオートとの併用も可能
<<~End
この行のインデントは無視される
End
//}
===[a:mutable] 破壊的な変更
Ruby の String クラスは mutable です。
つまり、オブジェクト自体を破壊的に変更できます。
「破壊的な変更」とは、あ... -
rubygems
/ security (32162.0) -
このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
...このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
=== 署名付きの Gem パッケージ
==== 目次
* 概要
* 解説
* コマンドラインオプション
* OpenSSL リファレンス
* Bugs / TODO
* 作者について
==== 概......要
このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
以下のセクションでは、署名付きの Gem パッケージを作成する方法を
ステップバイステップで解説しています。
==== 解説
@todo メソッドでは......E: 後述しますが
PKI には盗まれた鍵によるリスクを軽減する方法があります。)
さて、Gem に署名しましょう。この例では Imlib2-Ruby を使用しますが、
あなたは好きな Gem を使用してもいいですよ。あなたの gemspec ファイルを... -
String
# unpack(template) -> Array (28462.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...Array#pack で生成された文字列を
テンプレート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるもの......は、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます。「長さ」の代わりに`*'とすることで「残り全て」
を表すこともできます。
長さの意味はテ......pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。
: a
ASCII文字列(ヌル文字を詰める/後続するヌル文字やスペースを残す)
//emlist[][ruby]{
["abc"].pack("a") # => "a"
["abc"].p......は、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます。「長さ」の代わりに`*'とすることで「残り全て」
を表すこともできます。
長さ... -
String
# partition(sep) -> [String , String , String] (27445.0) -
セパレータ sep が最初に登場する部分で self を 3 つに分割し、 [最初のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
...セパレータ sep が最初に登場する部分で self を 3 つに分割し、
[最初のセパレータより前の部分, セパレータ, それ以降の部分]
の 3 要素の配列を返します。
self がセパレータを含まないときは、
返り値の第 2 要素と第 3 要......@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".partition("x") # => ["a", "x", "axa"]
p "aaaaa".partition("x") # => ["aaaaa", "", ""]
p "aaaaa".partition("") # => ["", "", "aaaaa"]
//}
@see String#rpartition, String#split... -
String
# split(sep = $ ; , limit = 0) -> [String] (27441.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
第 1 引数 sep は以下のいずれかです。
: 正規表現
正規表現にマッチする部分で分割する。
特に、括弧に......なし
@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数
//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a", "b", "c"]
p " a \t b \n c".split(nil) # => ["a", "b", "c"]
p " a \t b \n c".split(' ')......# => ["a", "b", "c"] # split(nil) と同じ
p " a \t b \n c".split # => ["a", "b", "c"] # split(nil) と同じ
//}
//emlist[括弧を含む正規表現][ruby]{
p '1-10,20'.split(/([-,])/) # => ["1", "-", "10", ",", "20"]
//}
//emlist[正規表現が空文字列にマッチす......1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
ブロックを指定すると、配列を返す代わりに分割した文字列で
ブロックを呼び出します。
第 1 引数 sep は以下の......@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数
@return ブロックを渡した場合は self、ブロックなしの場合は配列
//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a", "b", "c"]
p "......a \t b \n c".split(nil) # => ["a", "b", "c"]
p " a \t b \n c".split(' ') # => ["a", "b", "c"] # split(nil) と同じ
p " a \t b \n c".split # => ["a", "b", "c"] # split(nil) と同じ
//}
//emlist[括弧を含む正規表現][ruby]{
p '1-10,20'.split(/([-,])/) # => ["1",... -
String
# rpartition(sep) -> [String , String , String] (27439.0) -
セパレータ sep が最後に登場する部分で self を 3 つに分割し、 [最後のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
...セパレータ sep が最後に登場する部分で self を 3 つに分割し、
[最後のセパレータより前の部分, セパレータ, それ以降の部分]
の 3 要素の配列を返します。
self がセパレータを含まないときは、
返り値の第 1 要素と第 2 要......素が空文字列になります。
@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".rpartition("x") # => ["axa", "x", "a"]
p "aaaaa".rpartition("x") # => ["", "", "aaaaa"]
//}
@see String#partition, String#split... -
String
# parse _ csv(**options) -> [String] (27393.0) -
CSV.parse_line(self, options) と同様です。
...CSV.parse_line(self, options) と同様です。
1 行の CSV 文字列を、文字列の配列に変換するためのショートカットです。
@param options CSV.new と同様のオプションを指定します。
//emlist[][ruby]{
require "csv"
p "Matz,Ruby\n".parse_csv......"Ruby"]
p "Matz|Ruby\r\n".parse_csv(col_sep: '|', row_sep: "\r\n") # => ["Matz", "Ruby"]
//}
Ruby 2.6 (CSV 3.0.2) から、次のオプションが使えるようになりました。
//emlist[][ruby]{
require 'csv'
p "1,,3\n".parse_csv # => ["1", nil, "3"]
p "1,,3\n".par......"3"]
//}
Ruby 2.7 (CSV 3.1.2) から、次のオプションが使えるようになりました。
//emlist[][ruby]{
require 'csv'
p "Matz, Ruby\n".parse_csv # => ["Matz", " Ruby"]
p "Matz, Ruby\n".parse_csv(strip: true) # => ["Matz", "Ruby"]
//}
@see CSV.new, CSV.parse_lin... -
String
# split(sep = $ ; , limit = 0) {|s| . . . } -> self (27341.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
ブロックを指定すると、配列を返す代わりに分割した文字列で
ブロックを呼び出します。
第 1 引数 sep は以下の......@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数
@return ブロックを渡した場合は self、ブロックなしの場合は配列
//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a", "b", "c"]
p "......a \t b \n c".split(nil) # => ["a", "b", "c"]
p " a \t b \n c".split(' ') # => ["a", "b", "c"] # split(nil) と同じ
p " a \t b \n c".split # => ["a", "b", "c"] # split(nil) と同じ
//}
//emlist[括弧を含む正規表現][ruby]{
p '1-10,20'.split(/([-,])/) # => ["1",... -
WEBrick
:: HTTPServlet :: CGIHandler :: Ruby -> String (27335.0) -
Ruby のパスを返します。
...
Ruby のパスを返します。... -
String
# delete _ prefix(prefix) -> String (27331.0) -
文字列の先頭から prefix を削除した文字列のコピーを返します。
...から prefix を削除した文字列のコピーを返します。
@param prefix 先頭から削除する文字列を指定します。
@return 文字列の先頭から prefix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("ll......o") # => "hello"
//}
@see String#delete_prefix!
@see String#delete_suffix
@see String#start_with?...