るりまサーチ

最速Rubyリファレンスマニュアル検索!
523件ヒット [1-100件を表示] (0.067秒)

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

検索結果

<< 1 2 3 ... > >>

String#start_with?(*prefixes) -> bool (27179.0)

self の先頭が prefixes のいずれかであるとき true を返します。

..."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#d...

String#start_with?(*strs) -> bool (27143.0)

self の先頭が strs のいずれかであるとき true を返します。

...れかであるとき true を返します。

@param strs パターンを表す文字列 (のリスト)

//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
//}

@see String#end_with?...

String#delete_prefix(prefix) -> String (21125.0)

文字列の先頭から 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#end_with?(*strs) -> bool (21042.0)

self の末尾が strs のいずれかであるとき true を返します。

...ずれかであるとき true を返します。

@param strs パターンを表す文字列 (のリスト)

//emlist[例][ruby]{
"string".end_with?("ing") # => true
"string".end_with?("str") # => false
"string".end_with?("str", "ing") # => true
//}

@see String#start_with?...
...@param strs パターンを表す文字列 (のリスト)

//emlist[例][ruby]{
"string".end_with?("ing") # => true
"string".end_with?("str") # => false
"string".end_with?("str", "ing") # => true
//}

@see String#start_with?
@see String#delete_suffix, String#delete_suffix!...

String#delete_prefix!(prefix) -> self | nil (21024.0)

self の先頭から破壊的に prefix を削除します。

...ら削除する文字列を指定します。

@return 削除した場合は self、変化しなかった場合は nil

//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}

@see String#delete_prefix
@see String#delete_suffix!
@see String#start_with?...

絞り込み条件を変える

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) -> Net::SMTP (18128.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

...し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)

このメソッドにブロックを与えた場合には、新しく作られた...
...で、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレ...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します

@see Net::SMTP#start, Net::SMTP.new...

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) {|smtp| .... } -> object (18128.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

...し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)

このメソッドにブロックを与えた場合には、新しく作られた...
...で、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレ...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します

@see Net::SMTP#start, Net::SMTP.new...

Net::SMTP.start(address, port = Net::SMTP.default_port, tls_verify: true, tls_hostname: nil, helo: &#39;localhost&#39;, user: nil, password: nil, authtype: DEFAULT_AUTH_TYPE) -> Net::SMTP (18128.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

...し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)

このメソッドにブロックを与えた場合には、新しく作られた...
...で、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレ...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します

@see Net::SMTP#start, Net::SMTP.new...

Net::SMTP.start(address, port = Net::SMTP.default_port, tls_verify: true, tls_hostname: nil, helo: &#39;localhost&#39;, user: nil, password: nil, authtype: DEFAULT_AUTH_TYPE) {|smtp| ... } -> object (18128.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

...し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)

このメソッドにブロックを与えた場合には、新しく作られた...
...で、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレ...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します

@see Net::SMTP#start, Net::SMTP.new...

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) -> Net::SMTP (18126.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

...し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo, user, password, authtype)

このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブジェクト
...
...で、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレ...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します

@see Net::SMTP#start, Net::SMTP.new...

絞り込み条件を変える

Net::SMTP.start(address, port = Net::SMTP.default_port, helo = &#39;localhost&#39;, user = nil, password = nil, authtype = DEFAULT_AUTH_TYPE) {|smtp| .... } -> object (18126.0)

新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。

...し、サーバに接続し、セッションを開始します。


以下と同じです。

require 'net/smtp'
Net::SMTP.new(address, port).start(helo, user, password, authtype)

このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブジェクト
...
...で、
シンボルで :plain, :login, :cram_md5 を指定します。

Example:

require 'net/smtp'

Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}

@param address 接続するサーバをホスト名もしくはIPアドレ...
...発生します
@raise Net::SMTPServerBusy SMTPエラーコード420,450の場合に発生します
@raise Net::SMTPSyntaxError SMTPエラーコード500の場合に発生します
@raise Net::SMTPFatalError SMTPエラーコード5xxの場合に発生します

@see Net::SMTP#start, Net::SMTP.new...

Symbol#start_with?(*prefixes) -> bool (6143.0)

self の先頭が prefixes のいずれかであるとき true を返します。

...返します。

(self.to_s.start_with?と同じです。)

@param prefixes パターンを表す文字列または正規表現 (のリスト)

@see Symbol#end_with?

@see String#start_with?

//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i)...
...#=> true

# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}...

Open3.#pipeline_start(*cmds) -> [Thread] (6126.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...を指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String
を指定します。
options には Hash で指定します。...
...env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname,...
...待つためのスレッ
ドの配列を返します。

例:

require "open3"

# xeyesを10秒だけ実行する。
Open3.pipeline_start("xeyes") {|ts|
sleep 10
t = ts[0]
Process.kill("TERM", t.pid)
p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
}

@...

Open3.#pipeline_start(*cmds) {|wait_thrs| ... } -> () (6126.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...を指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String
を指定します。
options には Hash で指定します。...
...env には環境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname,...
...待つためのスレッ
ドの配列を返します。

例:

require "open3"

# xeyesを10秒だけ実行する。
Open3.pipeline_start("xeyes") {|ts|
sleep 10
t = ts[0]
Process.kill("TERM", t.pid)
p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
}

@...

ruby 1.6 feature (330.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...りました。

p "#{ "" }"

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"

=> ruby 1.6.7 (2002-09-25) [i586-linux]
""

これは1.7...
...ません。1.6に入るかも不明です。-))

: 2002-07-11 String#slice!

範囲外の文字列を指定したときに例外を返す場合がありましたが、常に nil
を返すようになりました。(String#[]やString#slice と同じ結果を返すと
いうことです)...
...了しない不具合が修正さ
れました。((<ruby-bugs-ja:PR#223>))

trap(:TERM, "EXIT")

END{
puts "exit"
}

Thread.start { Thread.stop }
sleep

: 2002-04-17: Regexp#inspect

((<ruby-bugs-ja:PR#222>))

p %r{\/}

=> ruby 1.6.7 (2002-03-01) [i586-linux]...

絞り込み条件を変える

<< 1 2 3 ... > >>