# **[](https://en.cppreference.com/w/c/header/string)** provides null-terminated string functions (`strlen`, `strcpy`, `strcat`, `strcmp`) and memory operations (`memcpy`, `memmove`, `memset`). Avoid `strcpy`/`strcat` (unsafe); use bounded variants or `snprintf` instead. The `mem*` functions work on raw bytes; the `str*` functions assume null termination. ## Example This example tokenizes a CSV line using `strtok` and measures each field. ```c // compile: gcc -o stringexample stringexample.c // run: ./stringexample // description: tokenize CSV line by comma and print each field #include #include int main() { char line[] = "alice,30,engineer,london"; char* tok = strtok(line, ","); int field = 0; while (tok) { printf("field %d: \"%s\" (len %zu)\n", field++, tok, strlen(tok)); tok = strtok(NULL, ","); } return 0; } ```