* @brief Trims leading whitespace from a string in-place * * @param Str the string to left-trim * @return VOID */
| 20 | * @return VOID |
| 21 | */ |
| 22 | static VOID |
| 23 | Ltrim(char * Str) |
| 24 | { |
| 25 | char * P = Str; |
| 26 | |
| 27 | while (*P && isspace((unsigned char)*P)) |
| 28 | P++; |
| 29 | |
| 30 | if (P != Str) |
| 31 | memmove(Str, P, strlen(P) + 1); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * @brief Trims trailing whitespace from a string in-place |