tomchesley
Technical User
I need a way to determine a text string if it is ok or not
examples
id's can be any hex number up to ffffffff
a = bad missing ^id
^0 = bad missing name before ^id
Tron^0 =0k valid name and id
John^48d7cf5 =ok valid name an id
Tonka^0^MAKIABDCCBOC/ZONA.SIT/circuit/+/4/1,8 = ok hosting game
Everett^48d7cf5^MJBFOLJFBILF//rally/+/1/1,8 =ok hosting game
Tonka^0^MJBFOLJFBILF =ok joined game
the pointer that contains this string is source_p->info
i can check for the len of this with
nlen = strlen(source_p->info);
but not sure how i can check for the ^ then the contents after or before
any hints?
examples
id's can be any hex number up to ffffffff
a = bad missing ^id
^0 = bad missing name before ^id
Tron^0 =0k valid name and id
John^48d7cf5 =ok valid name an id
Tonka^0^MAKIABDCCBOC/ZONA.SIT/circuit/+/4/1,8 = ok hosting game
Everett^48d7cf5^MJBFOLJFBILF//rally/+/1/1,8 =ok hosting game
Tonka^0^MJBFOLJFBILF =ok joined game
the pointer that contains this string is source_p->info
i can check for the len of this with
nlen = strlen(source_p->info);
but not sure how i can check for the ^ then the contents after or before
any hints?