文書改定履歴


この表は、NSString クラスリファレンス への変更点を説明します。


日付ノート
2016-03-21このクラスリファレンスに UIKit と AppKit の追加部分を合併しました。
2014-07-15全体への細部の編集を適用しました。
2014-02-11UTF16 と UTF32 が cStringUsingEncoding: に許容されたコード化ではないことに注意しました。
cStringUsingEncoding: の特別な考慮事項の項を参照してください。
行末に対処するメソッド用に getLineStart:end:contentsEnd:forRange: に相互参照を追加しました。
2013-09-18OS X v10.9 用に更新。戻り値の型はを nstancetype に変更しました。stringByAddingPercentEncoding­WithAllowedCharacters: と、stringByRemovingPercentEncoding メソッドを追加しました。
compare:options:range:locale:、と rangeOfString:options:range:locale: 及び stringByFoldingWithOptions:locale: の説明を更新し、locale 引数のデフォルト値を正しく記述しました。
writeToURL:atomically:encoding:error: のみがファイルの URL をサポートしていると注意しました。
stringWithCString:encoding: の説明を更新し、それは 16 ビットコード化をサポートしていないことに注意しました。
substringFromIndex: の index 引数の説明を更新し、それは文字列の長さまでのインデックスを許可することを示しました。
writeToFile:atomically:encoding:error:writeToURL:atomically:encoding:error: によって書かれた拡張属性は、将来的に長くすることができ、現在のコンテンツを読んでいる誰でもが長いコンテンツを受信する事に対して適切に守る必要があると注意を追加しました。
2013-01-28rangeOfComposedCharacterSequenceAtIndex: で提供されていた rangeOfComposedCharacterSequencesForRange: の実装例を削除しました。
2012-07-17OS X v10.8 用に更新。
2012-06-11stringByReplacingOccurrencesOfString:withString: options:range:、stringByAddingPercentEscapesUsingEncoding:、pathExtension、lastPathComponent、 writeToFile:atomically:encoding:error:、及び writeToURL:atomically:encoding:error: の議論を明確にしました。様々なタイプエラーを修正しました。
2011-10-11fileSystemRepresentation メソッドが、空の文字列で例外をスローする事を示すように更新しました。
2011-06-06OS X v10.7 用に更新。言語的なタグ付け用に新しいメソッドを追加しました。
OS X v10.7 用に更新しました。言語的なタグ付け用に新しいメソッドを追加しました。
2010-02-25新しい NSRegularExpressionSearch 定数を追加しました。
2009-08-28NSProprietaryStringEncoding は旧式になったことを指摘しました。
2009-05-29OS X v10.6 用に更新。文字列の並べ替え、列挙、および構成された文字シーケンスのメソッドについての情報を追加し、明らかにしました。旧式になった getCharacters: メソッド。全体を通した細かな修正。
2009-02-04getCharacters: の抽象を、getCharacters:range: の、抽象をより密接に反映するために変更しました。
2008-10-15longLongValue の戻り値の補正。全ての rangeOfCharacter... 及び rangeOfString... メソッドの要約を言い換え、それらのパラメータの説明内の 補正された名前の不一致を修正しました。
定数 NSWidthInsensitiveSearch の説明を書き直しました。NSStringEncodingConversionOptions の議論でクロスリファレンスの誤りを修正しました。compare:options:range:locale:rangeOfString:options:range:locale: 及び stringByFoldingWithOptions:locale: の比較文字列演算の locale オプションの効果の説明範を追加しました。
2008-03-11UTF-16 の入力を取るファクトリーおよび初期化メソッドのバイト順の仮定を紹介する記述の段落を追加しました。
getLineStart:end:contentsEnd:forRange:getParagraphStart:end:contentsEnd :forRange:componentsSeparatedByCharactersInSet:、及び componentsSeparatedByString: の説明を明確にしました。
2008-02-08誤植を修正しました。
2007-10-31stringByStandardizingPath メソッドの効果を明確にしました。
2007-08-23文字列の比較に関する追加したディスカッション・ノートを、ユーザに提示するように追加しました。
2007-07-19getCharacters: と getCString: での必要なバッファサイズの説明を増やしました。stringWithUTF8String と initWithUTF8String: に NULL を渡す事に関する警告を追加しました。
2007-03-06initWithCharacters メソッドの議論を修正しました。noCopy:creation メソッドが失敗した場合の動作を明確にしました。
2007-02-08いくつかのメソッドのパラメータの説明を強化しました。
2006-11-07stringWithUTF8String: に NULL を渡さないように警告しました。
2006-10-03getCharacters: と、getCString: メソッドでの必要なバッファサイズの説明を増やしました。
2006-06-28dataUsingEncoding の戻り値を明確にしました。
2006-05-23Foundation 定数記事から定数を組み込みました。




前:NSString
目次
Xcode の新機能

インターフェースビルダー ヘルプ
ストーリーボード
NSObject(class)

  • NSString
  • 概観
  • 文字列オブジェクト
  • 文字を理解する
    UTF-16 でエンコードされたデータの解釈
  • サブクラス化の注意
  • オーバーライドするべきメソッド
    サブクラス化の代替
  • タスク
  • 文字列の作成と初期化
  • string
    init 指名イニシャライザー
    initWithBytes:length:encoding:
    initWithBytesNoCopy:length:encoding :freeWhenDone:
    initWithCharacters:length:
    initWithCharactersNoCopy:length :freeWhenDone:
    initWithString:
    initWithCString:encoding:
    initWithUTF8String:
    initWithFormat:
    initWithFormat:arguments:
    initWithFormat:locale:
    initWithFormat:locale:arguments:
    initWithData:encoding:
    stringWithFormat:
    localizedStringWithFormat:
    stringWithCharacters:length:
    stringWithString:
    stringWithCString:encoding:
    stringWithUTF8String:
  • ファイルから文字列を作成し初期化
  • stringWithContentsOfFile:encoding :error:
    initWithContentsOfFile:encoding :error:
    stringWithContentsOfFile :usedEncoding:error:
    initWithContentsOfFile :usedEncoding:error:
  • URL から文字列を作成し初期化
  • stringWithContentsOfURL:encoding :error:
    initWithContentsOfURL:encoding :error:
    stringWithContentsOfURL :usedEncoding:error:
    initWithContentsOfURL :usedEncoding:error:
  • ファイルまたは URL への書き込み
  • writeToFile:atomically:encoding:error:
    writeToURL:atomically:encoding:error:
  • 文字列の長さを得る
  • length プロパティ
    lengthOfBytesUsingEncoding:
    maximumLengthOfBytesUsingEncoding:
  • 文字とバイトを得る
  • characterAtIndex:
    getCharacters:range:
    getBytes:maxLength:usedLength :encoding:options :range:remainingRange:
  • C の文字列を得る
  • cStringUsingEncoding:
    getCString:maxLength:encoding:

    UTF8String プロパティ
  • 文字列の特定と比較
  • caseInsensitiveCompare:
    localizedCaseInsensitiveCompare:
    compare:
    localizedCompare:
    compare:options:
    compare:options:range:
    compare:options:range:locale:
    localizedStandardCompare:
    hasPrefix:
    hasSuffix:
    isEqualToString:
    hashプロパティ
  • 文字列の組み合わせ
  • stringByAppendingFormat:
    stringByAppendingString:
    stringByPaddingToLength:withString :startingAtIndex:
  • 文字列の分割
  • componentsSeparatedByString:
    componentsSeparatedByCharactersInSet:
    stringByTrimmingCharactersInSet:
    substringFromIndex:
    substringWithRange:
    substringToIndex:
  • 文字と部分文字列の検索
  • containsString:
    localizedCaseInsensitiveContainsString:
    localizedStandardContainsString:
    localizedStandardRangeOfString:
    rangeOfCharacterFromSet:
    rangeOfCharacterFromSet:options:
    rangeOfCharacterFromSet:options:range:
    rangeOfString:
    rangeOfString:options:
    rangeOfString:options:range:
    rangeOfString:options:range:locale:
    enumerateLinesUsingBlock:
    enumerateSubstringsInRange:options :usingBlock:
  • 部分文字列の置き換え
  • stringByReplacingOccurrencesOfString :withString:
    stringByReplacingOccurrencesOfString :withString:options:range:
    stringByReplacingCharactersInRange :withString:
  • 行と段落の範囲の決定
  • getLineStart:end:contentsEnd:forRange:
    lineRangeForRange:
    getParagraphStart:end:contentsEnd :forRange:
    paragraphRangeForRange:
  • 合成文字シーケンスの決定
  • rangeOfComposedCharacterSequence
    AtIndex:

    rangeOfComposedCharacterSequences
    ForRange:

  • 文字列の内容のプロパティリストへの変換
  • propertyList
    propertyListFromStringsFileFormat
  • 文字列の描画
  • drawAtPoint:withAttributes:
    drawInRect:withAttributes:
    drawWithRect:options:attributes :context:
    boundingRectWithSize:options :attributes:context:
    sizeWithAttributes:
  • 文字列の折りたたみ
  • stringByFoldingWithOptions:locale:
  • 共有接頭辞の取得
  • commonPrefixWithString:options:
  • 大文字小文字の変更
  • capitalizedString プロパティ
    capitalizedStringWithLocale:

    lowercaseString プロパティ
    lowercaseStringWithLocale:
    uppercaseString プロパティ
    uppercaseStringWithLocale:
  • マッピングによる文字列取得
  • decomposedStringWithCanonical
    Mapping プロパティ

    decomposedStringWithCompatibility
    Mapping プロパティ

    precomposedStringWithCanonical
    Mapping プロパティ

    precomposedStringWithCompatibility
    Mapping プロパティ

  • 数値の取得
  • doubleValue プロパティ
    floatValue プロパティ
    intValue プロパティ
    integerValue プロパティ
    longLongValue プロパティ
    boolValue プロパティ
  • コード化での作業
  • availableStringEncodings
    defaultCStringEncoding
    localizedNameOfStringEncoding:
    canBeConvertedToEncoding:
    dataUsingEncoding:
    dataUsingEncoding:allowLossyConversion:
    description プロパティ
    fastestEncoding プロパティ
    smallestEncoding プロパティ
  • パスでの作業
  • pathWithComponents:
    pathComponents プロパティ
    completePathIntoString:caseSensitive :matchesIntoArray:filterTypes:
    fileSystemRepresentation プロパティ
    getFileSystemRepresentation:maxLength:
    AbsolutePath プロパティ
    lastPathComponent プロパティ
    pathExtension プロパティ
    stringByAbbreviatingWithTildeInPath プロパティ
    stringByAppendingPathComponent:
    stringByAppendingPathExtension:
    stringByDeletingLastPathComponent プロパティ
    stringByDeletingPathExtension プロパティ
    stringByExpandingTildeInPath プロパティ
    stringByResolvingSymlinksInPath プロパティ
    stringByStandardizingPath プロパティ
    stringsByAppendingPaths:
  • URL での作業
  • stringByAddingPercentEncoding
    WithAllowedCharacters:

    stringByRemovingPercentEncoding


  • 言語的タグ付けと分析
  • enumerateLinguisticTagsInRange :scheme:options:orthography:usingBlock:
    linguisticTagsInRange:scheme :options:orthography:tokenRanges:
  • 旧式
  • stringWithCString:
    initWithCString:
    stringWithCString:length:
    initWithCString:length:
    initWithCStringNoCopy:length: freeWhenDone:
    stringWithContentsOfFile:
    initWithContentsOfFile:
    stringWithContentsOfURL:
    initWithContentsOfURL:
    writeToFile:atomically:
    writeToURL:atomically:
    getCharacters:
    cString
    cStringLength
    getCString:
    getCString:maxLength:
    getCString:maxLength:range :remainingRange:
    stringByAddingPercentEscapesUsing
    Encoding:

    stringByReplacingPercentEscapes
    UsingEncoding:

    drawWithRect:options:attributes:
    boundingRectWithSize:options:attributes:
  • データ型
  • unichar
  • 定数
  • NSStringCompareOptions
    NSStringEncodingConversionOptions
    NSStringEncoding
    NSStringEnumerationOptions
    NSStringDrawingOptions
    NSTextAlignment
    NSWritingDirection
    NSString 例外処理の名
    文字列コード化検出オプション
    文書改定履歴