* @brief Trims trailing whitespace from a string in-place * * @param Str the string to right-trim * @return VOID */
| 38 | * @return VOID |
| 39 | */ |
| 40 | static VOID |
| 41 | Rtrim(char * Str) |
| 42 | { |
| 43 | char * End = Str + strlen(Str); |
| 44 | |
| 45 | while (End > Str && isspace((unsigned char)End[-1])) |
| 46 | End--; |
| 47 | |
| 48 | *End = '\0'; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @brief Trims leading and trailing whitespace from a string in-place |