Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find whether a string is guid in c++

Tags:

c++

How to find whether a string is guid in native c++? a code sample would help greatly

like image 947
Sapna Avatar asked Dec 10 '22 10:12

Sapna


1 Answers

If you need to do it by hand (information from wikipedia):

  1. Check the length (36, including hyphens)
  2. Check that the hyphens are at the expected positions (9-14-19-24)
  3. Check that all other characters are hexadecimal (isxdigit)
like image 189
stefaanv Avatar answered Dec 21 '22 17:12

stefaanv