标签:android des style blog http java
iOS 基础类解析 - NSString
太阳火神的美丽人生 (http://blog.csdn.net/opengl_es)
本文遵循“署名-非商业用途-保持一致”创作公用协议
以下从苹果官网摘录的 NSString 的目录信息,大家发现了,条目太多,不过看一下分类,一共24个,好像少很多了吧,就是这样,理解了每一个分类所要做的事情和做事情的原则,那么再具体到由哪一个方法来做,就没那么重要了,苹果的方法重载与 C++/Java 不太一样,但那只是表面形式的不同,本质是一样的,都是 面向对象/基于对象 的那些基本特点:重载、多态、继承、封装,还有一些原则,比如对修改封闭,对扩展开放,等等...!
接下来,24类看着也有点多,我再帮初学者们扎腾扎腾,你就会发现,这些看似一堆 一堆 的东西,变得条理清晰,也没那么让人头疼了。
NSString 类参考
NSString Class Reference
+ 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:+ stringWithCString: Deprecated
 in iOS 2.0+ stringWithCString:length: Deprecated
 in iOS 2.0– initWithCString: Deprecated
 in iOS 2.0– initWithCString:length: Deprecated
 in iOS 2.0– initWithCStringNoCopy:length:freeWhenDone: Deprecated
 in iOS 2.0+ stringWithContentsOfFile:encoding:error:– initWithContentsOfFile:encoding:error:+ stringWithContentsOfFile:usedEncoding:error:– initWithContentsOfFile:usedEncoding:error:+ stringWithContentsOfFile: Deprecated
 in iOS 2.0– initWithContentsOfFile: Deprecated
 in iOS 2.0+ stringWithContentsOfURL:encoding:error:– initWithContentsOfURL:encoding:error:+ stringWithContentsOfURL:usedEncoding:error:– initWithContentsOfURL:usedEncoding:error:+ stringWithContentsOfURL: Deprecated
 in iOS 2.0– initWithContentsOfURL: Deprecated
 in iOS 2.0– writeToFile:atomically:encoding:error:– writeToURL:atomically:encoding:error:– writeToFile:atomically: Deprecated
 in iOS 2.0– writeToURL:atomically: Deprecated
 in iOS 2.0– characterAtIndex:– getCharacters:range:– getBytes:maxLength:usedLength:encoding:options:range:remainingRange:– getCharacters: Deprecated
 in iOS 4.0– cStringUsingEncoding:– getCString:maxLength:encoding:– UTF8String– cString Deprecated
 in iOS 2.0– cStringLength Deprecated
 in iOS 2.0– getCString: Deprecated
 in iOS 2.0– getCString:maxLength: Deprecated
 in iOS 2.0– getCString:maxLength:range:remainingRange: Deprecated
 in iOS 2.0– lossyCString Deprecated
 in iOS 2.0– stringByAppendingFormat:– stringByAppendingString:– stringByPaddingToLength:withString:startingAtIndex:– componentsSeparatedByString:– componentsSeparatedByCharactersInSet:– stringByTrimmingCharactersInSet:– substringFromIndex:– substringWithRange:– substringToIndex:– 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:– caseInsensitiveCompare:– localizedCaseInsensitiveCompare:– compare:– localizedCompare:– compare:options:– compare:options:range:– compare:options:range:locale:– localizedStandardCompare:– hasPrefix:– hasSuffix:– isEqualToString:– hash– capitalizedString– capitalizedStringWithLocale:– lowercaseString– lowercaseStringWithLocale:– uppercaseString– uppercaseStringWithLocale:– decomposedStringWithCanonicalMapping– decomposedStringWithCompatibilityMapping– precomposedStringWithCanonicalMapping– precomposedStringWithCompatibilityMapping+ availableStringEncodings+ defaultCStringEncoding+ localizedNameOfStringEncoding:– canBeConvertedToEncoding:– dataUsingEncoding:– dataUsingEncoding:allowLossyConversion:– description– fastestEncoding– smallestEncoding+ pathWithComponents:– pathComponents– completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:– fileSystemRepresentation– getFileSystemRepresentation:maxLength:– isAbsolutePath– lastPathComponent– pathExtension– stringByAbbreviatingWithTildeInPath– stringByAppendingPathComponent:– stringByAppendingPathExtension:– stringByDeletingLastPathComponent– stringByDeletingPathExtension– stringByExpandingTildeInPath– stringByResolvingSymlinksInPath– stringByStandardizingPath– stringsByAppendingPaths:– stringByAddingPercentEscapesUsingEncoding:– stringByReplacingPercentEscapesUsingEncoding:– stringByAddingPercentEncodingWithAllowedCharacters:– stringByRemovingPercentEncoding
Copyright ? 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-02-11
iOS 基础类解析 - NSString,码迷,mamicode.com
标签:android des style blog http java
原文地址:http://blog.csdn.net/opengl_es/article/details/24829203