Files
Operator-system/string_utils.h

26 lines
730 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 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 */