Instance Method インスタンスメソッド

initWithCString:length:

Initializes the receiver, a newly allocated NSString object, by converting the data in a given C-string from the default C-string encoding into the Unicode character encoding. レシーバ、ある新しくアロケートされたNSStringオブジェクトを、与えられたC文字列の中のデータを省略時のC文字列符号化からユニコード文字符号化へと変換することによって初期化します。

Declaration 宣言

- (id)initWithCString:(const char *)bytes 
               length:(NSUInteger)length;

Discussion 議論

This method converts length * sizeof(char) bytes from cString and doesn’t stop short at a zero character. cString must contain bytes in the default C-string encoding and may not be NULL. Returns an initialized object, which might be different from the original receiver. このメソッドは、length * sizeof(char)バイトをcStringから変換します、そしてゼロ文字で立ち止まりません。cStringは、バイトを省略時のC文字列符号化で含まなければなりません、そしてNULLでないかもしれません。初期化されたオブジェクトを返します、それは元のレシーバとは異なるかもしれません。

See Also 参照

Deprecated 非推奨

Related Documentation 関連文書