CaseySJ
Moderator
- Joined
- Nov 11, 2018
- Messages
- 22,236
- Motherboard
- Asus ProArt Z690-Creator
- CPU
- i7-12700K
- Graphics
- RX 6800 XT
- Mac
- Classic Mac
- Mobile Phone
Because a lot of Ryzentosh owners use this kext, it would be good to accommodate this weird version number.
If you are splitting the version string using the dot "." as a delimiter, then each split could be examined from left to right looking for a non-digit. If a non-digit such as "f" is found, then the string from that point forward could be terminated.
Example:
- 0.7.2f1 will be split into 3 substrings using "." as a delimiter:
- "0"
- "7"
- "2f1"
- Each substring can be checked from left to right, looking for non-digit character:
- "0" --> no non-digit characters
- "7" --> no non-digit characters
- "2f1" --> the character "f" is not a digit so the string gets terminated here, which leads to:
- "2"
Last edited: