[Swift]Stringクラスのメソッド[メモ]


自分のための覚書。
型がよくわからないところは???にしています。

間違ってるかもしれませんので、気づいた方はよかったらコメントで指摘してください。

>https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/
>にNSStringクラスのSwift用のリファレンスもあるけど、Stringクラスとは微妙に違うっぽい。

## クラス・メソッド


### availableStringEncoding()
- availableStringEncoding() -> NSStringEncoding[]

### bridgeFromObjectiveC(x: NSString)
- bridgeFromObjectiveC(x: NSString) -> String?

### bridgeToObjectiveC(self: String)
- bridgeToObjectiveC(self: String) -> () -> NSString

### canBeConvertedToEncoding(self: String)
- canBeConvertedToEncoding(self: String) -> (NSStringEncoding) -> Bool

### String capitalizedStringWithLocale(self: String)
- capitalizedStringWithLocale(self: String) -> NSLocale

### caseInsensitiveCompare(self: String)
- caseInsensitiveCompare(self: String) -> (String) -> NSComparisonResult

### commonPrefixWithString(self: String)
- commonPrefixWithString(self: String) -> (String, options: NSStringCompareOptions) -> String

### compare(self: String)
- compare(self: String) -> (String, options: NSStringCompareOptions) -> Int
- compare(self: String) -> (String) -> Int

>
>（まだ途中）
>






## インスタンス・メソッド　と　プロパティ


### bringToObjectiveC()
- bringToObjectiveC() -> NSString

### canBeConvertedToEncoding(encoding: NSStringEncoding)
- canBeConvertedToEncoding(encoding: NSStringEncoding) -> Bool

### capitalizedString
- capitalizedString -> String

### capitalizedStringWithLocale(locale: NSLocale)
- capitalizedStringWithLocale(locale: NSLocale) -> String

### caseInsensitiveCompare(aString: String)
- caseInsensitiveCompare(aString: String) -> NSComparisonResult

### commonPrefixWithString(aString: String, options: NSStringCompareOptions)
- commonPrefixWithString(aString: String, options: NSStringCompareOptions) -> String

### compare(aString: String, options: NSStringCompareOptions, range: Range<String.Index>?, locale: NSLocale?)
- compare(aString: String, options: NSStringCompareOptions, range: Range<String.Index>?, locale: NSLocale?) -> NSComparisonResult

### compare(other: String)
- compare(other: String) -> Int

### completePathIntoString(outputName: CMutablePointer<String>, caseSensitive: Bool, matchesIntoArray: CMutablePointer<String[]>, filterTypes: String[]?)
- completePathIntoString(outputName: CMutablePointer<String>, caseSensitive: Bool, matchesIntoArray: CMutablePointer<String[]>, filterTypes: String[]?) -> Int

### componentSeparatedByCharactersInSet(separator: String)
- componentSeparatedByCharactersInSet(separator: String) -> String[]

### componentSeparatedByString(separator: String)
- componentSeparatedByString(separator: String) -> String[]

### cStringUsingEncoding(encoding: NSStringEncoding)
- cStringUsingEncoding(encoding: NSStringEncoding) -> CChar[]?

### dataUsingEncoding(encoding: NSStringEncoding, allowLossyConversion: Bool)
- dataUsingEncoding(encoding: NSStringEncoding, allowLossyConversion: Bool) -> NSData

### debugDescription
- debugDescription -> String

### decompressedStringWithCanonicaMapping
- decompressedStringWithCanonicaMapping -> String

### decompressedStringWithCompatibilityMapping
- decompressedStringWithCompatibilityMapping -> String

### endIndex
- endIndex -> String.Index

### enumerateLines(body: (line: String, input stop: Bool) ->())
- enumerateLines(body: (line: String, input stop: Bool) ->()) -> Void

### enumerateLinguisticTagsInRange(range: Range<String.Index>, scheme: String, options: NSLinguisticTaggerOptions, orthography: NSOrthography?, body: (String, Range<String.Index>, Range<String.Index>, inout Bool) -> ())
- enumerateLinguisticTagsInRange(range: Range<String.Index>, scheme: String, options: NSLinguisticTaggerOptions, orthography: NSOrthography?, body: (String, Range<String.Index>, Range<String.Index>, inout Bool) -> ()) -> Void

### enumerateSubstringsInRange(range: Range<String.Index>#>, options: NSStringEnumerationOptions, body: (substring: String, substringRange: Range<String.Index>, enclosingRange: Range<String.Index>, inout Bool) -> ())
- enumerateSubstringsInRange(range: Range<String.Index>#>, options: NSStringEnumerationOptions, body: (substring: String, substringRange: Range<String.Index>, enclosingRange: Range<String.Index>, inout Bool) -> ()) -> Void

### extend(seq: S)
- extend(seq: S) -> Void

### fastestEncoding
- fastestEncoding -> NSStringEncoding

### fileSystemRepresentation()
- fileSystemRepresentation() -> CChar[]

### generate()
- generate() -> IndexingGenerator<String>

### getBytes(&buffer: UInt8[], maxLength: Int, usedLength: CMutablePointer<Int>, encoding: NSStringEncoding, options: NSStringEncodingConversionOptions, range: Range<String.Index>, remainingRange: CMutablePointer<Range<String.Index>>)
- getBytes(&buffer: UInt8[], maxLength: Int, usedLength: CMutablePointer<Int>, encoding: NSStringEncoding, options: NSStringEncodingConversionOptions, range: Range<String.Index>, remainingRange: CMutablePointer<Range<String.Index>>) -> Bool

### getCString(&buffer: CChar[], maxLength: Int, encoding: NSStringEncoding)
- getCString(&buffer: CChar[], maxLength: Int, encoding: NSStringEncoding) -> Bool

### getFileSystemRepresentation(&buffer: CChar[], maxLength: Int)
- getFileSystemRepresentation(&buffer: CChar[], maxLength: Int) -> Bool

### getLineStart(start: CMutablePointer<String.Index>, end: CMutablePointer<String.Index>, contentsEnd: CMutablePointer<String.Index>, forRange: Range<String.Index>)
- getLineStart(start: CMutablePointer<String.Index>, end: CMutablePointer<String.Index>, contentsEnd: CMutablePointer<String.Index>, forRange: Range<String.Index>) -> Void

### getMirror()
- getMirror() -> Mirror

### getParagraphStart(start: CMutablePointer<String.Index>, end: CMutablePointer<String.Index>, contentsEnd: CMutablePointer<String.Index>, forRange: Range<String.Index>)
- getParagraphStart(start: CMutablePointer<String.Index>, end: CMutablePointer<String.Index>, contentsEnd: CMutablePointer<String.Index>, forRange: Range<String.Index>) -> Void

### hash
- hash -> Int

### hashValue
- hashValue -> Int

### hasPrefix(prefix: String)
- hasPrefix(prefix: String) -> Bool

### hasSuffix(suffix: String)
- hasSuffix(suffix: String) -> Bool

### isEmpty
- isEmpty -> Bool

### join(elements: S)
- join(elements: S) -> String

### lastPathComponent
- lastPathComponent -> String

### lengthOfBytesUsingEncoding(encoding: NSStringEncoding)
- lengthOfBytesUsingEncoding(encoding: NSStringEncoding) -> Int

### lineRangeForRange(aRange: Range<String.Index>)
- lineRangeForRange(aRange: Range<String.Index>) -> Range<String.Index>

### linguisticTagsInRange(range: Range<String.Index>, scheme: String, options: NSLinguisticTaggerOptions, orthography: NSOrthography?, tokenRanges: CMutablePointer<Range<String.Index>[]>)
- linguisticTagsInRange(range: Range<String.Index>, scheme: String, options: NSLinguisticTaggerOptions, orthography: NSOrthography?, tokenRanges: CMutablePointer<Range<String.Index>[]>) -> String[]

### localizedCaseInsensitiveCompare(aString: String)
- localizedCaseInsensitiveCompare(aString: String) -> NSComparisonResult

### localizedCompare(aString: String)
- localizedCompare(aString: String) -> NSComparisonResult

### localizedStandardCompare(string: String)
- localizedStandardCompare(string: String) -> NSComparisonResult

### lowercaseString
- lowercaseString -> String

### lowercaseStringWithLocale(locale: NSLocale)
- lowercaseStringWithLocale(locale: NSLocale) -> String

### maximumLengthOfBytesUsingEncoding(encoding: NSStringEncoding)
- maximumLengthOfBytesUsingEncoding(encoding: NSStringEncoding) -> Int

### nulTerminatedUTF8
- nulTerminatedUTF8 -> ContiguousArray<CodeUnit>

### paragraphRangeForRange(aRange: Range<String.Index>)
- paragraphRangeForRange(aRange: Range<String.Index>) -> Range<String.Index>

### pathComponents
- pathComponents -> String[]

### pathExtension
- pathExtension -> String

### precomposedStringWithCanonicalMapping
- precomposedStringWithCanonicalMapping -> String

### precomposedStringWithCompatibilityMapping
- precomposedStringWithCompatibilityMapping -> String

### propertyList()
- propertyList() -> AnyObject

### propertyListFromStringFileFormat()
- propertyListFromStringFileFormat() -> Dictionary<String, String>

### rangeOfCharacterFromSet(aSet: NSCharacterSet, options: NSStringCompareOptions, range: Range<String.Index>?)
- rangeOfCharacterFromSet(aSet: NSCharacterSet, options: NSStringCompareOptions, range: Range<String.Index>?) -> Range<String.Index>

### rangeOfComposedCharacterSequenceAtIndex(anIndex: String.Index)
- rangeOfComposedCharacterSequenceAtIndex(anIndex: String.Index) -> Range<String.Index>

### rangeOfComposedCharacterSequenceForRange(range: Range<String.Index>)
- rangeOfComposedCharacterSequenceForRange(range: Range<String.Index>) -> Range<String.Index>

### rangeOfString(aString: String, options: NSStringCompareOptions, range: Range<String.Index>?, locale: NSLocale?)
- rangeOfString(aString: String, options: NSStringCompareOptions, range: Range<String.Index>?, locale: NSLocale?) -> Range<String.Index>

### reserveCapacity(n: Int)
- reserveCapacity(n: Int) -> Void

### smallestEncoding
- smallestEncoding -> NSStringEncoding

### startIndex
- startIndex -> String.Index

### stringByAbbreviatingWithTildeInPath()
- stringByAbbreviatingWithTildaInPath() -> String

### stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacters: NSCharacterSet)
- stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacters: NSCharacterSet) -> String

### stringByAddingPercentEscapesUsingEncoding(encoding: NSStringEncoding)
- stringByAddingPercentEscapesUsingEncoding(encoding: NSStringEncoding) -> String

### stringByAppendingFormat(format: String, arguments: CVarArg[])
- stringByAppendingFormat(format: String, arguments: CVarArg[]) -> String

### stringByAppendingPathComponent(aString: String)
- stringByAppendingPathComponent(aString: String) -> String

### stringByAppendingPathExtension(ext: String)
- stringByAppendingPathExtension(ext: String) -> String

### stringByAppendingString(aString: String)
- stringByAppendingString(aString: String) -> String

### stringByDeletingLastPathComponent
- stringByDeletingLastPathComponent -> String

### stringByDeletingPathExtension
- stringByDeletingPathExtension -> String

### stringByExpandingTildeInPath
- stringByExpandingTildeInPath -> String

### stringByFoldingWithOptions(options: NSStringCompareOptions, locale: NSLocale)
- stringByFoldingWithOptions(options: NSStringCompareOptions, locale: NSLocale) -> String

### stringPaddingToLength(newLength: Int, withString: String, startingAtIndex: Int)
- stringPaddingToLength(newLength: Int, withString: String, startingAtIndex: Int) -> String

### stringByRemovingPercentEncoding
- stringByRemovingPercentEncoding -> String

### stringByReplacingCharactersInRange(range: Range<String.Index>, withString: String)
- stringByReplacingCharactersInRange(range: Range<String.Index>, withString: String) -> String

### stringByReplacingOccurrencesOfString(target: String, withString: String, options: NSStringCompareOptions, range: Range<String.Index>?)
- stringByReplacingOccurrencesOfString(target: String, withString: String, options: NSStringCompareOptions, range: Range<String.Index>?) -> String

### stringByReplacingPercentEscapesUsingEncoding(encoding: NSStringEncoding)
- stringByReplacingPercentEscapesUsingEncoding(encoding: NSStringEncoding) -> String

### stringByResolvingSymlinkInPath
- stringByResolvingSymlinkInPath -> String

### stringByStandardizingPath
- stringByStandardizingPath -> String

### stringByTrimmingCharactersInSet(set: NSCharacterSet)
- stringByTrimmingCharactersInSet(set: NSCharacterSet) -> String

### stringsByAppendingPaths(paths: String[])
- stringByAppendingPaths(paths: String[]) -> String[]

### substringFromIndex(index: Int)
- substringFromIndex(index: Int) -> String

### substringToIndex(index: Int)
- substringToIndex(index: Int) -> String

### substringWithRange(aRange: Range<String.Index>)
- substringWithRange(aRange: Range<String.Index>) -> String

### toInt()
- toInt() -> Int?

### unicodeScalars
- unicodeScalars -> String.UnicodeScalarView

### uppercaseString
- uppercaseString -> String

### uppercaseStringWithLocale(locale: NSLocale)
- uppercaseStringWithLocale(locale: NSLocale) -> String

### utf16
- utf16 -> String.UTF16View

### utf16count
- utf16count -> Int

### utf8
- utf8 -> String.UTF8View

### withCString(f: (CString) -> Result)
- withCString(f: (CString) -> Result) -> Result

### withCString(f: (UnsafePointer<CChar>) -> Result)
- withCString(f: (UnsafePointer<CChar>) -> Result) -> Result

### write(string: String)
- write(string: String) -> Void

### writeTo(&target: Target)
- writeTo(&target: Target) -> Void

### writeTofile(path: String, atomically: Bool, encoding: NSStringEncoding, error: NSErrorPointer)
- writeTofile(path: String, atomically: Bool, encoding: NSStringEncoding, error: NSErrorPointer) -> Bool

### writeToURL(url: NSURL, atomically: Bool, encoding: NSStringEncoding, error: NSErrorPointer)
- writeToURL(url: NSURL, atomically: Bool, encoding: NSStringEncoding, error: NSErrorPointer) -> Bool