'string'에 해당되는 글 2건

  1. 2011.12.13 [wp7] 화페 단위 변환하기
  2. 2011.07.14 [iphone] string append하기
Windows Phone 72011. 12. 13. 11:11

 

public static string MoneyConvert(string money)
       {
           int result = Convert.ToInt32(money);
           return String.Format("{0:#,0}원", result);
       }

결론은 이렇고

string format 할때 N 이나 C를 쓰게 되면

 

53,900.00 원이렇게 나오기 때문에

 

이렇게 하는게 최선인듯

Posted by 동동(이재동)
iPhone App2011. 7. 14. 17:07

스트링을 append할때

NSString에 stringAppendingString인가 를 쓰니까 안붙어져서

NSMutableString을 쓰니까 잘 된다.

NSString *name = [NSString stringWithString:[item objectForKey:@"name"]];

[totalName appendFormat:@"%@ "name];


이런식으로
appendFormat을 이용하자
그리고 줄 바꿀려면 \n 을 이용하면 된다.
Posted by 동동(이재동)