26 lines
730 B
C
26 lines
730 B
C
/*
|
||
* string_utils.h – Wide-character (CHAR16) string helpers.
|
||
*
|
||
* Utility functions for the kernel's interactive shell: whitespace
|
||
* detection, case-insensitive comparison, and in-place trimming.
|
||
*/
|
||
|
||
#ifndef STRING_UTILS_H
|
||
#define STRING_UTILS_H
|
||
|
||
#include "kernel_types.h"
|
||
|
||
/* Return TRUE if Ch is a space or horizontal tab. */
|
||
BOOLEAN is_space16(CHAR16 Ch);
|
||
|
||
/* Return the ASCII lower-case equivalent of Ch (A-Z only). */
|
||
CHAR16 ascii_lower16(CHAR16 Ch);
|
||
|
||
/* Case-insensitive equality test for two NUL-terminated CHAR16 strings. */
|
||
BOOLEAN ascii_streq_ci(const CHAR16 *A, const CHAR16 *B);
|
||
|
||
/* Strip leading and trailing whitespace from Cmd in place. */
|
||
void trim_spaces_inplace(CHAR16 *Cmd);
|
||
|
||
#endif /* STRING_UTILS_H */
|