5
我需要寫號碼,如: 1> YEK轉換數目即,在目標C
123> yeksadöBISTö本身
1123> YEK hezaröyeksadöBISTö本身
3002001> SE暢想o不要hezarØYEK ...
我,在客觀C :)
米初學者我把它寫在C,但我想轉換它,進入obj_c!我怎樣才能做到這一點?
財產以後這樣的:
const char *yekan[10]={"","yek","do","se","chahar","panj","shesh","haft","hasht","noh"};
char ary[9]={'0','0','0','0','0','0','0','0','0'};
// get a number from user & converting it to string
// user number: 123 > the number in ary:000 000 123)
// '3' => 3
m=(int) ary[8];
m=m-'0';
if (j==3) { printf(" %s ",yekan[m]);} // yekan[3] = se
output: se
感謝。
感謝您的回答:)的斯威夫特版本,但我如何設置區域設置爲波斯env ...? – aden 2010-07-31 10:56:12
Wo0oW我可以設置persianlocal :) NSLocale * persianLocale = [[NSLocale alloc] initWithLocaleIdentifier:@「fa_IR」]; 再次感謝:* – aden 2010-07-31 11:27:32
非常感謝。:) – 2012-08-21 14:22:32