First of all, sorry for this simple question. But I need to understand what is happening.
I thought the output should be upper case string
. But it comes out to be UPPER CASE STRING
.
- (void)test
{
NSString *stringVar = @"UPPER CASE STRING";
[self changeString:stringVar];
NSLog(@"value after changed : %@", stringVar);
}
- (void)changeString:(NSString*)string
{
string = [string lowercaseString];
}
What is happening and how to fix it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…