別のキーワード
種類
- 文書 (89)
- 特異メソッド (36)
- ライブラリ (24)
- クラス (24)
- インスタンスメソッド (12)
ライブラリ
- ビルトイン (12)
- csv (48)
-
irb
/ input-method (12)
クラス
- CSV (36)
-
IRB
:: ReadlineInputMethod (12)
キーワード
- CSV (12)
- IO (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 3
. 0 . 0 (5) -
generate
_ line (12) - new (12)
- open-uri (12)
- rdoc (12)
- readlines (12)
-
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) - リテラル (12)
- 変数と定数 (12)
- 字句構造 (12)
- 正規表現 (12)
検索結果
先頭5件
-
IRB
:: ReadlineInputMethod # encoding -> Encoding (21202.0) -
自身の文字エンコーディングを返します。
自身の文字エンコーディングを返します。 -
CSV
. generate _ line(row , options = Hash . new) -> String (6113.0) -
このメソッドは一つの Array オブジェクトを CSV 文字列に変換するためのショートカットです。 複数行のCSVを扱う際はCSV#<<を使うとより高速です。
...:encoding というキーを使用すると出力のエンコーディングを指定することができます。
:row_sep というキーの値には $/ がセットされます。
//emlist[例][ruby]{
require "csv"
taro = ['1', 'taro', 'tanaka', '20']
CSV.generate_line(taro... -
CSV
. readlines(path , options = Hash . new) -> [Array] | CSV :: Table (3112.0) -
CSV ファイルを配列の配列にするために使います。 headers オプションに偽でない値を指定した場合は CSV::Table オブジェクトを返します。
...同じオプションを指定できます。
:encoding というキーを使用すると入力のエンコーディングを指定することができます。
入力のエンコーディングか Encoding.default_external と異なる場合は
必ず... -
正規表現 (112.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
...pansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列のパター......水平タブ horizontal tab (0x09)
\v 垂直タブ vertical tab (0x0B)
\n 改行 newline (0x0A)
\r 復帰 return (0x0D)
\b バックスペース back space (0x08)
\f......ctuation | Final_Punctuation | Initial_Punctuation | Other_Punctuation | Open_Punctuation)
* [:space:] 空白、改行、復帰 (Space_Separator | Line_Separator | Paragraph_Separator | 0009 | 000A | 000B | 000C | 000D | 0085)
* [:upper:] 大文字 (Uppercase_Letter)
* [:xdigit:] 16進表記... -
IO (84.0)
-
基本的な入出力機能のためのクラスです。
...ます。
詳しくは「io_encoding」を参照して下さい。
以下がテキスト読み込みメソッドです。
* IO.foreach
* IO.readlines
* IO#each_line
* IO#lines
* IO#gets
* IO#getc
* IO#ungetc
* IO#read
* IO#readchar
* IO#readline
* IO#readlines
バイナリ読み込み......動作します。
例:
f = File.open('t.txt', 'r+:euc-jp')
p f.getc.encoding #=> Encoding::EUC_JP
p f.read(1).encoding #=> Encoding::ASCII_8BIT
====[a:io_encoding] IO のエンコーディングとエンコーディングの変換
IO......定されていない場合
IO からテキスト読み込みメソッドによって読み込まれた文字列のエンコーディングは Encoding.default_external
に設定されます。このとき実際の文字エンコーディングは検査されず、変換もされません。
:......うけます。
詳しくは「io_encoding」を参照して下さい。
以下がテキスト読み込みメソッドです。
* IO.foreach
* IO.readlines
* IO#each_line
* IO#gets
* IO#getc
* IO#ungetc
* IO#read
* IO#readchar
* IO#readline
* IO#readlines
バイナリ読み込みメソ... -
CSV (66.0)
-
このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。
...parser works in the Encoding of the IO
or String object being read from or written to. Your data is never transcoded
(unless you ask Ruby to transcode it for you) and will literally be parsed in
the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the
Encoding of your data. Th......is is accomplished by transcoding the parser itself
into your Encoding.
Some transcoding must take place, of course, to accomplish this multiencoding
support. For example, <tt>:col_sep</tt>, <tt>:row_sep</tt>, and
<tt>:quote_char</tt> must be transcoded to match your data. Hopefully this
makes th......ll of Ruby's Encodings.
Anyway, the practical side of this is simple: make sure IO and String objects
passed into CSV have the proper Encoding set and everything should just work.
CSV methods that allow you to open IO objects (CSV::foreach(), CSV::open(),
CSV::read(), and CSV::readlines()) do allo... -
rdoc (66.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...パブリックメソッドのみです)。
: --charset charset
生成する HTML の charset を指定します。
可能であれば --encoding を使用してください。
: --coverage-report level, --dcov level
ドキュメントが記述されていない要素に関するレポー......す。
: --encoding encoding
出力ファイルの文字エンコーディングを encoding に指定します。rdoc が読
み込んだ全てのファイルはこの文字エンコーディングに変換されま
す。--charset オプションもありますが --encoding オプショ......べ
て探索されます。
: --inline-source
デフォルトでは、メソッドのソースコードはポップアップウィンドウで表示
されます。このオプションを付けると、インラインで表示されます。
: --line-numbers
ソースコードに行番... -
NEWS for Ruby 2
. 0 . 0 (48.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...す
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました
* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints
* Kernel
* 追加: Kernel.#Hash という変換メソッド。Kernel.#Array, Kernel.#Float に似ています......uence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#base_label,
RubyVM::InstructionSequence#first_lineno to retrieve information from where
the instruction sequence was defined.
* スタックの使用量を指定するための環境変数......のスレッドである場合、
ThreadError を発生させます
* Time
* 返り値変更:
* Time#to_s now returns US-ASCII encoding instead of BINARY.
* TracePoint
* new class. This class is replacement of set_trace_func.
Easy to use and efficient implementation.... -
NEWS for Ruby 3
. 0 . 0 (48.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...st{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in` i......the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a SyntaxError instead of
a warning.
== Command line options
=== `--help` option
When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input a......en keys and their values. 15822
* Windows: Read ENV names and values as UTF-8 encoded Strings 12650
* Encoding
* Added new encoding IBM720. 16233
* Changed default for Encoding.default_external to UTF-8 on Windows 16604
* Fiber
* Fiber.new(blocking: true/false) allows you to cr...