Checks if the provided string is hex encoded >>> isHexEncodedString('DEADBEEF') True >>> isHexEncodedString('test') False
(subject)
| 2331 | return filepath.replace('\\', '/') if filepath else filepath |
| 2332 | |
| 2333 | def isHexEncodedString(subject): |
| 2334 | """ |
| 2335 | Checks if the provided string is hex encoded |
| 2336 | |
| 2337 | >>> isHexEncodedString('DEADBEEF') |
| 2338 | True |
| 2339 | >>> isHexEncodedString('test') |
| 2340 | False |
| 2341 | """ |
| 2342 | |
| 2343 | return re.match(r"\A[0-9a-fA-Fx]+\Z", subject) is not None |
| 2344 | |
| 2345 | @cachedmethod |
| 2346 | def getConsoleWidth(default=80): |
no test coverage detected
searching dependent graphs…