I have a string (in this instance 'James')
if a letter is assigned a number a=1 b=2 etc)
James equate to 48
How could I split all the constiuent letters out and add the sums ?
Thanks in advance
James(48)
-------------------------------------------------------
local stringvar word:='james'; //48
local numbervar wl:=length(word);
local stringvar x:=left(word,1);
numbervar let:=
if X ='a' then 1
else if X='b' then 2
else if X='c' then 3
else if X='d' then 4
else if X='e' then 5
else if X='f' then 6
else if X='g' then 7
else if X='h' then 8
else if X='i' then 9
else if X='j' then 10
else if X='k' then 11
else if X='l' then 12
else if X='m' then 13
else if X='n' then 14
else if X='o' then 15
else if X='p' then 16
else if X='q' then 17
else if X='r' then 18
else if X='s' then 19
else if X='t' then 20
else if X='u' then 21
else if X='v' then 22
else if X='w' then 23
else if X='x' then 24
else if X='y' then 25
else if X='z' then 26;
let