left_justify()

left_justify()#

The left_justify() function removes leading and trailing whitespace characters from the given string s, ensuring that the string is left-aligned with no extra spaces at the beginning or end.

Prototype

void left_justify(char *s);

Parameters

Key

Type

Description

s

char *

A pointer to a null-terminated string that will be modified in place to remove leading and trailing whitespace.


Return Value

This function does not return a value.

Notes

If s is NULL, the function does nothing. The function modifies the input string directly.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples