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

stringByAppendingPathComponent:

Returns a new string made by appending to the receiver a given string. ある新しい文字列を返します、レシーバにある与えられた文字列を追加することによって作られます。

Declaration 宣言

- (NSString *)stringByAppendingPathComponent:(NSString *)str;

Parameters パラメータ

aString

The path component to append to the receiver. レシーバに加えることになるパス構成要素。

Return Value 戻り値

A new string made by appending aString to the receiver, preceded if necessary by a path separator. aStringをレシーバに追加することによって作られるある新しい文字列、必要に応じてパス分離子を前に置かれます。

Discussion 議論

The following table illustrates the effect of this method on a variety of different paths, assuming that aString is supplied as “scratch.tiff”: 以下の表は、このメソッドの効果を様々な異なるパスに関して解説します、aStringが “scratch.tiff”として提供されると仮定します:

Receiver’s String Value レシーバのもつ文字列値

Resulting String 結果文字列

/tmp

/tmp/scratch.tiff

/tmp/

/tmp/scratch.tiff

/

/scratch.tiff

“” (an empty string) “”(空の文字列)

scratch.tiff

Note that this method only works with file paths (not, for example, string representations of URLs). このメソッドはファイルパスでのみ働くことに注意してください(例えば、URLの文字列表現ではなく)。

See Also 参照

Working with Paths パスを扱う