DEV Community

Discussion on: Code Validation

Collapse
 
bernardbaker profile image
Bernard Baker

What about converting the function representation to unicode?

Collapse
 
ankitbeniwal profile image
Ankit Beniwal

can you please elaborate that?

Collapse
 
bernardbaker profile image
Bernard Baker

Well unicode holds values for line feeds, carriage returns and spaces as well as tabs.

With the use of a regular expression and grouping in regular expressions you should be able to test your string to see if it validates as a c function.

Thread Thread
 
ankitbeniwal profile image
Ankit Beniwal

Exactly what i was thinking but without unicode. Now you just gave me the missing part. Thanks!!

Thread Thread
 
bernardbaker profile image
Bernard Baker

Run a few tests and let me know how you get on.

Thread Thread
 
ankitbeniwal profile image
Ankit Beniwal

sure thing