Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, the `toSnakeCase` function used in the Wrappers would convert `IPV4` to `ip_v4`. This conflicts with the `_to_snake_case` function used in the datamodel code generator, which would return `ipv4`. The latter is the version used in the Zivid SDK, so this commit fixes the `toSnakeCase` function so that it uses the latter version. Previously, the `String::toSnakeCase` function would insert a "_" in the following two cases: 1. If an upper case letter is preceded by any character that is not an upper case letter. 2. If an upper case letter is preceded by an upper case letter and succeeded by any character that is not an upper case letter. These rules are a little ambigous due to using the negation of the `isupper` function. This commit instead uses the `islower` function in the places where the negation of `isupper` was used. This new version inserts a "_" in the following two cases: 1. If an upper case letter is preceded by a lower case letter. 2. If an upper case letter is preceded by any character that is not a lower case letter and is succeeded by a lower case letter. MISC
- Loading branch information