310件ヒット
[201-300件を表示]
(0.074秒)
別のキーワード
種類
- インスタンスメソッド (157)
- 特異メソッド (72)
- モジュール関数 (48)
- 文書 (21)
- ライブラリ (12)
クラス
-
Net
:: HTTPResponse (12) - Refinement (4)
- Regexp (22)
- String (141)
- WIN32OLE (12)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Ruby用語集 (12)
- codepage (12)
- codepoints (24)
- compile (11)
-
decode
_ www _ form _ component (12) -
each
_ codepoint (24) - encode (43)
- encode! (24)
- encode64 (12)
-
encode
_ www _ form _ component (12) - escape (7)
- hexencode (12)
-
import
_ methods (4) - kconv (12)
- new (11)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) -
url
_ encode (12) -
urlsafe
_ encode64 (12)
検索結果
先頭5件
-
Base64
. # encode64(bin) -> String (6207.0) -
与えられたデータを Base64 エンコードした文字列を返します。
...字ごとに改行を追加します。
@param bin Base64 エンコードするデータを指定します。
require 'base64'
Base64.encode64("Now is the time for all good coders\nto learn Ruby")
# => Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g
# UnVieQ==... -
Base64
. # urlsafe _ encode64(bin , padding: true) -> String (6207.0) -
与えられたデータを Base64 エンコードした文字列を返します。
...データを指定します。
@param padding false を指定した場合、 = によるパディングが行われなくなります。
//emlist[例][ruby]{
require 'base64'
p Base64.urlsafe_encode64('hoge')
# => "aG9nZQ=="
p Base64.urlsafe_encode64('hoge', padding: false)
# => "aG9nZQ"
//}... -
WIN32OLE
. codepage -> Integer (6112.0) -
WIN32OLEがOLEオートメーションのインターフェイスに利用するコードページを 取得します。
...ージを
取得します。
OLEオートメーションに利用する文字列はUnicodeでエンコードします。
WIN32OLEはここで示されたコードページを利用してRubyのStringとUnicodeの相
互変換を行います。
ロード時の既定値はEncoding.default_internal......するコード
ページが見つからない場合は、WIN32OLE::CP_ACPを利用します。
@return WIN32OLEがオートメーション呼び出しの文字列変換に利用するコード
ページを返します。
WIN32OLE.codepage # => 932 (日本語Windowsの既定値)... -
Ruby用語集 (3939.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...Ruby用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-ba......
String における文字の位置、
といったものは 0 オリジンである。
: 1 オリジン
: one-based
番号が 1 から始まること。
例えば、
エラーメッセージにおける行番号、
正規表現検索におけるキャプチャーの番号、
Ruby 2.......z’ Ruby Implementation)とも呼ばれる。
: Crystal
Ruby によく似たオブジェクト指向プログラミング言語。
型推論を持った静的型付け言語であり、処理系はコンパイラーである。
https://ja.crystal-lang.org/
: CSI 方式
CSI は Code Set... -
NEWS for Ruby 3
. 0 . 0 (3513.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......参照してください。
== 言語仕様の変更
* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywor......", "f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no lo... -
NEWS for Ruby 3
. 1 . 0 (3279.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.1.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......には、ハッシュリテラルを使用する必要があります。 16806
* String
* Unicodeと絵文字のバージョンが13.0.0に更新されました。 17750 18029
* String#unpack と String#unpack1 が任意のバイト数をスキップした後にアンパックを開始す......ました。 17485
//emlist[Time.new][ruby]{
Time.new(2021, 12, 25, in: "+07:00")
#=> 2021-12-25 00:00:00 +0700
//}
* 同時に、時刻の要素の文字列がより厳密に整数に変換されるようになりました。
//emlist[Time.new][ruby]{
Time.new(2021, 12, 25, "+07:30")
#=> i... -
ERB
:: Util . # url _ encode(s) -> String (3220.0) -
文字列 s を URLエンコードした文字列を返します。
...を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide
//}... -
URI
. escape(str , unsafe = URI :: UNSAFE) -> String (3108.0) -
URI 文字列をエンコードした文字列を返します。
...I 文字列をエンコードした文字列を返します。
このメソッドは obsolete です。
代わりに
ERB::Util.#url_encode,
CGI.escape,
URI.encode_www_form_component,
WEBrick::HTTPUtils.#escape_form,
WEBrick::HTTPUtils.#escape
などの使用を検討してください。
詳細は... -
Regexp
. compile(string , option = nil , code = nil) -> Regexp (238.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。
@param string 正規表現を文字列として与えま......して見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と同じになります。
@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ......の指定は警告を出力します。
@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。
//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
th... -
Regexp
. new(string , option = nil , code = nil) -> Regexp (238.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。
@param string 正規表現を文字列として与えま......して見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と同じになります。
@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ......の指定は警告を出力します。
@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。
//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
th... -
kconv (84.0)
-
日本語文字コードの変換を手軽に行うためのライブラリです。
...。
kconv を require すると String クラスに変換用のメソッドが定義されます。
Kconv にも同等のメソッドが定義されます。 Kconv には
エンコーディングを表す定数も定義されています。
1.9.1 以降では、Ruby の m17n 機能を用いてエ....../emlist[][ruby]{
require 'kconv'
newstring = Kconv.kconv(string, Kconv::JIS, Kconv::AUTO)
newstring = Kconv.tojis(string)
newstring = Kconv.toeuc(string)
newstring = Kconv.tosjis(string)
guessed_code = Kconv.guess(string)
//}
または
//emlist[][ruby]{
require 'kconv'
newstring = string.kconv(Kco......nv::JIS, Kconv::AUTO)
newstring = string.tojis
newstring = string.toeuc
newstring = string.tosjis
//}...