4075件ヒット
[1-100件を表示]
(0.062秒)
種類
ライブラリ
- English (96)
- ビルトイン (1929)
-
cgi
/ html (24) - csv (168)
- digest (24)
- forwardable (24)
-
irb
/ cmd / help (12) -
irb
/ extend-command (24) - json (108)
-
json
/ add / exception (12) - mkmf (48)
-
net
/ ftp (12) -
net
/ http (60) -
net
/ pop (108) -
net
/ smtp (36) - openssl (12)
- optparse (132)
- psych (12)
- rake (192)
-
rake
/ packagetask (36) -
rdoc
/ markup (24) - readline (60)
-
ripper
/ filter (12) -
ripper
/ lexer (36) -
rubygems
/ commands / dependency _ command (36) -
rubygems
/ dependency (24) - socket (60)
- stringio (12)
- strscan (96)
- tmpdir (24)
-
webrick
/ httputils (60) - win32ole (60)
- zlib (132)
クラス
-
ARGF
. class (12) - Array (33)
- BasicSocket (12)
- CSV (144)
-
CSV
:: FieldInfo (12) - Data (6)
-
Digest
:: Base (24) - Dir (60)
-
Encoding
:: InvalidByteSequenceError (12) -
Encoding
:: UndefinedConversionError (12) - Enumerator (24)
- Exception (80)
- File (12)
-
Gem
:: Commands :: DependencyCommand (36) -
Gem
:: Dependency (24) - IO (28)
-
IRB
:: ExtendCommand :: Help (12) -
JSON
:: Parser (12) - LoadError (12)
- MatchData (48)
- Method (36)
- Module (576)
- NameError (12)
-
Net
:: FTP (12) -
Net
:: HTTPResponse (24) -
Net
:: POPMail (108) -
Net
:: SMTP (36) - Object (120)
- OptionParser (132)
-
RDoc
:: Markup (12) -
Rake
:: Application (36) -
Rake
:: FileList (84) -
Rake
:: InvocationChain (12) -
Rake
:: PackageTask (36) - Range (19)
- Refinement (4)
- Regexp (48)
- Ripper (36)
-
RubyVM
:: InstructionSequence (72) - SignalException (12)
- String (193)
- StringIO (12)
- StringScanner (84)
- Struct (48)
- Symbol (12)
- Thread (12)
-
Thread
:: Backtrace :: Location (48) - TracePoint (43)
- UDPSocket (48)
- UnboundMethod (12)
- UncaughtThrowError (11)
-
WEBrick
:: HTTPUtils :: FormData (60) -
WIN32OLE
_ TYPE (12) -
WIN32OLE
_ VARIABLE (48) -
Zlib
:: Deflate (36) -
Zlib
:: GzipReader (36) -
Zlib
:: Inflate (60)
モジュール
-
CGI
:: HtmlExtension (24) - Forwardable (24)
-
IRB
:: ExtendCommandBundle (24) - JSON (48)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) - Kernel (456)
-
Net
:: HTTPHeader (36) - Rake (12)
-
Rake
:: TaskManager (24) - Readline (36)
- Signal (24)
オブジェクト
-
Readline
:: HISTORY (24) - main (12)
キーワード
-
$ & (12) -
$ & # 39; (12) -
$ 1 (12) -
$ 10 (12) -
$ 11 (12) -
$ 2 (12) -
$ 3 (12) -
$ 4 (12) -
$ 5 (12) -
$ 6 (12) -
$ 7 (12) -
$ 8 (12) -
$ 9 (12) -
$ ARGV (12) -
$ ERROR _ POSITION (12) -
$ INPUT _ RECORD _ SEPARATOR (12) -
$ LAST _ PAREN _ MATCH (12) -
$ LAST _ READ _ LINE (12) -
$ ORS (12) -
$ OUTPUT _ RECORD _ SEPARATOR (12) -
$ RS (12) -
$ _ (12) -
$ ` (12) - % (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- == (12)
- === (48)
- =~ (12)
- CSV (12)
- Emitter (12)
- Enumerator (12)
- Extend (24)
- Filter (12)
- Markup (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
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) - OCSP (12)
-
RSTRING
_ END (12) -
RSTRING
_ PTR (12) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Rubyの起動 (12)
- Ruby用語集 (12)
- StringScanner (12)
- [] (72)
-
_ dump (12) -
absolute
_ path (24) -
add
_ special (12) -
alias
_ method (12) - all (36)
- arguments (12)
- arity (12)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (24)
- autoload? (12)
- backtrace (24)
-
base
_ label (24) - bigdecimal (12)
- caller (36)
- cgi (12)
-
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (12)
-
completion
_ append _ character (12) -
completion
_ append _ character= (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - cover? (19)
-
create
_ id (12) - crypt (12)
-
def
_ extend _ command (12) - define (6)
-
define
_ method (24) -
define
_ singleton _ method (24) - deflate (12)
- delegate (12)
-
delete
_ suffix (8) -
delete
_ suffix! (8) - desc (12)
- disasm (12)
- disassemble (12)
- dump (12)
- dup (12)
- each (24)
-
each
_ byte (24) -
each
_ line (24) -
enable
_ config (24) -
end
_ with? (18) -
error
_ bytes (12) -
error
_ char (12) -
eval
_ script (7) - execute (12)
- ext (12)
- fetch (36)
- filename (12)
- filename= (12)
- filter (36)
- finish (12)
- flush (12)
- format (12)
- generate (24)
- gets (36)
- gsub! (12)
- header (12)
- help (12)
- hexdigest (12)
- html (24)
-
import
_ methods (4) - inflate (24)
- inspect (72)
-
instance
_ delegate (12) -
instance
_ method (12) - irb (12)
-
irb
_ original _ method _ name (12) -
is
_ a? (12) -
json
_ create (12) -
kind
_ of? (12) - label (12)
-
last
_ comment (12) -
last
_ description (12) -
last
_ match (24) - lex (12)
- logger (12)
- mail (36)
- match? (12)
-
matched
_ size (12) -
method
_ defined? (12) - mktmpdir (24)
-
module
_ function (36) - name (72)
- name= (12)
-
net
/ smtp (12) - new (60)
-
ole
_ type (12) -
ole
_ type _ detail (12) - open (48)
-
original
_ dir (24) - pack (21)
- pack テンプレート文字列 (12)
-
package
_ dir (12) -
package
_ dir _ path (12) - parse (24)
- parse! (12)
- path (60)
- pathmap (12)
- peek (12)
- peep (12)
- pointer= (12)
- pop (36)
- pos= (12)
- pp (12)
- pread (8)
- prepend (21)
-
print
_ dependencies (12) - private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) - progids (12)
-
program
_ name (12) -
protected
_ method _ defined? (12) - public (48)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method _ defined? (12) - pwrite (8)
-
rake
_ extension (12) - rakefile (12)
- rdoc (12)
- read (24)
-
read
_ body (24) - readchar (12)
- readline (48)
-
recvfrom
_ nonblock (12) - recvmsg (12)
- release (12)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ method (12) -
requirements
_ list (12) - rss (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) - seek (12)
- send (36)
-
send
_ mail (12) - sendcmd (12)
- sendmail (12)
-
set
_ backtrace (12) -
set
_ dictionary (24) - shift (12)
- signm (12)
-
singleton
_ method (12) - slice (12)
- source (12)
-
source
_ location (12) - sprintf (12)
- sprintf フォーマット (12)
-
start
_ with? (18) - sub! (12)
- sum (12)
-
summary
_ indent (12) - syswrite (12)
-
to
_ a (12) -
to
_ json (24) -
to
_ path (12) -
to
_ s (143) -
to
_ str (12) - tokenize (12)
- trap (24)
-
try
_ convert (12) -
undef
_ method (12) - unpack (12)
- unparse (12)
- unscan (12)
- upto (12)
- usage (12)
- using (12)
- ver (12)
-
webrick
/ cgi (12) -
with
_ config (24) -
with
_ object (24) - yaml (12)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- リテラル (12)
検索結果
先頭5件
-
String (38186.0)
-
文字列のクラスです。 ヌル文字を含む任意のバイト列を扱うことができます。 文字列の長さにはメモリ容量以外の制限はありません。
...ープシーケンスがほぼ無効)
"string\n" # ダブルクオート文字列 (エスケープシーケンスがすべて有効)
%q(str\\ing) # 「%q」文字列 (エスケープシーケンスがほぼ無効、デリミタが変えられる)
%Q(string\n) # 「%Q」文字列 (エスケープ......<<End
この行はヒアドキュメント
End
# ダブルクオートヒアドキュメント (クオートなしの場合と同じ)
<<"End"
この行はヒアドキュメント
End
# シングルクオートヒアドキュメント (一切のエスケープシーケンスが無効)
<<'End'
こ......ト
End
# 終端記号がインデントされたヒアドキュメント
# シングルクオート、ダブルクオートとの併用も可能
<<-End
この行はヒアドキュメント (終端記号をインデントできる)
End
//}
===[a:mutable] 破壊的な変更
Ruby の String ク......行はヒアドキュメント
End
# 終端記号がインデントされたヒアドキュメント
# シングルクオート、ダブルクオートとの併用も可能
<<-End
この行はヒアドキュメント (終端記号をインデントできる)
End
# 中身がインデントされ... -
String
# prepend(*arguments) -> String (27202.0) -
複数の文字列を先頭に破壊的に追加します。
...列を先頭に破壊的に追加します。
@param arguments 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "!!!"
a.prepend # => "!!!"
a # => "!!!"
a = "!!!"
a.prepend "hello ", "world" # => "hello world!!!"
a # => "hello world!!!"
//}... -
String
# prepend(other _ str) -> String (27202.0) -
文字列 other_str を先頭に破壊的に追加します。
...文字列 other_str を先頭に破壊的に追加します。
@param other_str 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "world"
a.prepend("hello ") # => "hello world"
a # => "hello world"
//}... -
String
# end _ with?(*strs) -> bool (27155.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 _ suffix(suffix) -> String (21137.0) -
文字列の末尾から suffix を削除した文字列のコピーを返します。
...。
@return 文字列の末尾から suffix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("hel") # => "hello"
//}
@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?... -
String
# %(args) -> String (21113.0) -
printf と同じ規則に従って args をフォーマットします。
...sprintf("%c", 'a') #=> "a"
//}
フラグ `-' と幅 の指定だけが意味を持ちます。
: s
文字列を出力します。
引数が String オブジェクトでなければ to_s メソッドにより文字列化
したものを引数として扱います。
: p
Object#inspect の......合に使
用します。
//emlist[][ruby]{
case ENV['LC_TIME']
when /^ja_JP/
fmt = "%1$d年%2$d月%3$d日"
else
fmt = "%2$02d/%03$2d/%1$02d"
end
p sprintf(fmt, 1, 4, 22) #=> "04/22/01"
//}
"*" の後に指定することで幅や
精度を引数で指定することもできます。
//emli... -
String
# crypt(salt) -> String (21113.0) -
self と salt から暗号化された文字列を生成して返します。 salt には英数字、ドット (「.」)、スラッシュ (「/」) から構成される、 2 バイト以上の文字列を指定します。
...きです。
他にも 29297 などがあります。
注意:
* Ruby 2.6 から非推奨になったため、引き続き必要な場合は
string-crypt gem の使用を検討してください。
* crypt の処理は crypt(3) の実装に依存しています。
従って、crypt で......(64),rand(64)].pack("C*").tr("\x00-\x3f","A-Za-z0-9./")
passwd.crypt(salt)
# UNIX のログイン認証
require 'etc'
def valid_login?(user, password)
ent = Etc.getpwnam(user)
password.crypt(ent.passwd) == ent.passwd
end
p valid_login?("taro", "password") # => 真偽値が得られる
//}... -
String
# unpack(template) -> Array (21078.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます......、整数サイズ非依存 (ネットワークプロトコルなどに適切)
//emlist{
n: big endian unsigned 16bit
N: big endian unsigned 32bit
v: little endian unsigned 16bit
V: little endian unsigned 32bit
//}
: エンディアン依存、整数サイズ依存 (C の構造体などに......に適切)
//emlist{
S>: big endian unsigned 16bit(nと同じ)
s>: big endian int16_t
s!>: big endian signed short
l<: little endian int32_t
l!<: little endian signed long
//}
=== 各テンプレート文字の説明
説明中、Array#pack と String#unpack で違いのあるものは......m template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることがで... -
String
# ==(other) -> bool (21064.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false......st[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" == other
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> false
def stringlike.to_str
raise
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> true
//}
@see String#eql?...