Last active
August 23, 2016 18:48
-
-
Save denispeyrusaubes/89495d4b6718d656b10a to your computer and use it in GitHub Desktop.
IOSBEG - Input text in objectiveC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(NSString *) getInput | |
{ | |
NSFileHandle *input = [NSFileHandle fileHandleWithStandardInput]; | |
NSData *inputData = [input availableData]; | |
NSString *inputString = [[NSString alloc] initWithData: inputData encoding:NSUTF8StringEncoding]; | |
inputString = [inputString stringByTrimmingCharactersInSet: [NSCharacterSet newlineCharacterSet]]; | |
return inputString; | |
} |
Author
denispeyrusaubes
commented
Aug 22, 2016
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment