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

stringByReplacingCharactersInRange:withString:

Returns a new string in which the characters in a specified range of the receiver are replaced by a given string. 新しい文字列を返します、そこにおいてレシーバの指定された範囲の中の文字は与えられた文字列によって置き換えられます。

Declaration 宣言

- (NSString *)stringByReplacingCharactersInRange:(NSRange)range 
                                      withString:(NSString *)replacement;

Parameters パラメータ

range

A range of characters in the receiver. レシーバの中の文字のある範囲。

replacement

The string with which to replace the characters in range. それとrangeの中の文字を置き換えることになる文字列。

Return Value 戻り値

A new string in which the characters in range of the receiver are replaced by replacement. ある新しい文字列、それにおいてレシーバのrangeの中の文字はreplacementによって置き換えられます。

See Also 参照

Replacing Substrings 下位文字列の置換

Related Documentation 関連文書