‎2007 Sep 04 10:31 AM
hi all,
I m having a requirement in which i need to put 'and' in between the converted string which i m getting as o/p from spell_amount FM.
e.g. if i give as 1234.00 its giving me as one thousend two hundred thirty four.
But i should print as one thousend two hundred <b>AND</b> thirty four. I can get it through finding string 'hundred' in the o/p and after that i can concatenate AND, but problem is if there are multiple occurences of ' Hundred' if m facing a problem.
Please help.
Points will be rewarded accordingly.
‎2007 Sep 04 10:47 AM
Hi
suppose if u have string like 1234.00 here pass last two digits to one more string let us say 34 to str1 and replace 0's with 34, 1200 and pass it to srting str2.
now call spell_amount to str1 and str2.
now str2 will result one thousand two hundered
and str1 will result thirty four
now concatenate str2 'AND' str1 into final_string
kiran.M
‎2007 Sep 04 10:47 AM
Hi
suppose if u have string like 1234.00 here pass last two digits to one more string let us say 34 to str1 and replace 0's with 34, 1200 and pass it to srting str2.
now call spell_amount to str1 and str2.
now str2 will result one thousand two hundered
and str1 will result thirty four
now concatenate str2 'AND' str1 into final_string
kiran.M
‎2007 Sep 04 11:01 AM
str = 1234.00
split string at '.' into str1 , str2.
str1 = 1234
str2 = 00
len = strlen (str1). =4
len1 = len - 2. = 2
str3 = str + len1(2). =34
str4 = str1 + 0(len1). =12
concatenate str4 '00' into str5. =1200
now u have 1200 in str5 and 34 in str3.
pass str5 and str3 to spell_amount FM.
Reward if it is helpful.
kiran.M
‎2007 Sep 04 11:04 AM
‎2007 Sep 04 11:12 AM
hI
First check my logic and understand i am spliting last two digits (34 ) and concatenating with 'AND'.
check once...