4
나는 thsi 함수를 사용하고 예를 들어 해당 문자를 표시하기 위해 5를 더하여 문자열에서 다른 문자를 가져옵니다. 'a'는 'f'를 표시하고 'h'는 'm'을 표시합니다 .. 하지만 문제는이 문자를 'fm'과 같이 표시 할 때 사용할 수있는 문자열에 추가 할 수 없다는 것입니다 ... 누구 도움? heres the code strResult (mutablestring)가 null 만되고있다. 모든NSString에 하나씩 다른 문자를 추가 하시겠습니까?
[email protected]"John";
int a=[str length];
for(i=0;i<a;i++)
{
char ch=[str characterAtIndex:i];
ch=ch+5;
temp=[NSString stringWithFormat:@"%c",ch];
[strResult appendString:temp];
NSLog(@"%c",ch);
}
strResult가 정의하는 방법, 당신이 어딘가에를 초기화 한 당신이 다음 원하는 것은
? – Vladimir