るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

Object#itself -> object (18113.0)

self を返します。

...self を返します。

//emlist[][ruby]{
string =
'my string' # => "my string"
string.itself.object_id == string.object_id # => true
//}...

CSV (24.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

..."another", "row"]
# ...
end

# 文字列へ書き込み
csv_string = CSV.generate do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end
//}

=== 一行変換

//emlist[][ruby]{
require 'csv'

csv_string = ["CSV", "data"].to_csv # => "CSV,data"
csv_array = "CSV,S...
...he Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the
Encoding of your data. This 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>...
...xception comes when generating CSV into a String with an Encoding
that is not ASCII compatible. There's no existing data for CSV to use to
prepare itself and thus you will probably need to manually specify the desired
Encoding for most of those cases. It will try to guess using the fields in a
row...