ios - How to convert Alphanumeric String to NUMBER String or NUMBER? -


i want convert alphanumeric string number. alphanumeric string contains numeric digits set [0-9], capital letters set [a-z] , small letters set [a-z] respectively numbers [00-09], [10-35] , [36-62].

per single letter or digit has generate 2 digit, if letter 'y' number '61' or letter 'c' number '12' or digit '6' number '06'.

for example:

alphanumeric string: "yc69cjjvvf"

number: 61380609121945315841

create plist have manually enter data digits set [0-9], capital letters set [a-z] , small letters set [a-z].

see image below.

enter image description here

and create 1 loop have pass alpha bate value.and number .

    nsstring *path = [[nsbundle mainbundle] pathforresource:                       @"yourplistname" oftype:@"plist"];      nsmutablearray *arrdata = [[nsmutablearray alloc] initwithcontentsoffile:path];     nsmutablearray *arrcode=[arrdata valueforkey:@"code"];     nsmutablearray *arrname=[arrdata valueforkey:@"name"];         nsstring *code = [[nsstring alloc] init];       (int i=0;i<[arrname count];i++)     {          if ([[arrname objectatindex:i] isequaltostring:straplahbates])//straplahbates string want number value.         {             [code appendformat:@"%@",arrcode [i]];            }     } 

may you.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

jquery - ReferenceError: CKEDITOR is not defined -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -