21件ヒット
[1-21件を表示]
(0.062秒)
クラス
- String (9)
-
WIN32OLE
_ VARIANT (12)
検索結果
先頭2件
-
String
. new(string = "" , encoding: string . encoding , capacity: string . bytesize) -> String (18222.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
...れば127、
それ以上であればstring.bytesizeになります。
@return 引数 string と同じ内容の文字列オブジェクト
//emlist[例][ruby]{
text = "hoge".encode("EUC-JP")
no_option = String.new(text) # => "hoge"
no_option.encod......ing == Encoding::EUC_JP # => true
with_encoding = String.new(text, encoding: "UTF-8") # => "hoge"
with_encoding.encoding == Encoding::UTF_8 # => true
String.new("test", encoding: "UTF-8", capacity: 100_000) # => "test"
//}... -
WIN32OLE
_ VARIANT . new(val , vartype = nil) -> WIN32OLE _ VARIANT (18138.0) -
指定したオブジェクトを値とするWIN32OLE_VARIANTオブジェクトを生成します。
...NilClass のいずれでもありません。
shell = WIN32OLE.new('Shell.Application')
folder = shell.NameSpace('C:\\Users\\Public\\Documents')
item = folder.ParseName('test.txt')
v = WIN32OLE_VARIANT.new('Delete')
item.invokeVerb(v) # => ゴミ箱への移動ダイア......ンコーディングをASCII-8BITに設
定した文字列となります。
include WIN32OLE::VARIANT
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.value #=> "\x01\x02\x03\x04\x05"
bytes.value.encoding #=> #<Encoding:ASCII-8BIT>
@see WIN32OLE::VARIANT...