Top "Nscharacterset" questions

An NSCharacterSet object represents a set of Unicode-compliant characters.

How to use stringByAddingPercentEncodingWithAllowedCharacters() for a URL in Swift 2.0

I was using this, in Swift 1.2 let urlwithPercentEscapes = myurlstring.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding) This now gives me a warning asking me …

string swift swift2 nscharacterset
Remove all non-numeric characters from a string in swift

I have the need to parse some unknown data which should just be a numeric value, but may contain whitespace …

swift nscharacterset
How can I check if a string contains letters in Swift?

I'm trying to check whether a specific string contains letters or not. So far I've come across NSCharacterSet.letterCharacterSet() as …

swift nscharacterset
Strip Non-Alphanumeric Characters from an NSString

I'm looking for a quick and easy way to strip non-alphanumeric characters from an NSString. Probably something using an NSCharacterSet, …

cocoa cocoa-touch nsstring nscharacterset
NSCharacterSet: How do I add "_" to alphanumericCharacterSet text restriction?

Building an NSCharacter set to restrict a UITextField for entering user names. I want the user to be able to …

iphone objective-c nscharacterset
stringByTrimmingCharactersInSet: is not removing characters in the middle of the string

I want to remove "#" from my string. I have tried NSString *abc = [@"A#BCD#D" stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"#"]]; But it …

objective-c string nsstring nscharacterset
How to create a custom NSCharacterSet?

I’m using CharacterSet.urlQueryAllowed to add percent-encoding to a String. Some characters are not encoded the way I expected (…

swift urlencode nscharacterset
how to use stringByTrimmingCharactersInSet in NSString

I have a string which gives the Date (below) NSString*str1=[objDict objectForKey:@"date"]; NSLog(@" str values2%@",str1); --> 04…

iphone ios nsstring nscharacterset
NSArray from NSCharacterSet

Currently I am able to make array of Alphabets like below [[NSArray alloc]initWithObjects:@"A",@"B",@"C",@"D",@"E",@"F",@"…

objective-c nscharacterset
Remove characters in NSCharacterSet from NSString

I have an NSCharacterSet which contains all the characters I want to remove from my NSString. How can I do …

objective-c nsstring nscharacterset