Skip to main content

capfirst

Capitalize the first letter of a string.

def capfirst(
x: any
) - > string

Capitalize the first letter of a string.

Parameters

NameTypeDescription
xanyThe value to be capitalized; if not already a string, it will be cast to its string representation

Returns

TypeDescription
stringThe input string with the first character converted to uppercase and the remaining characters left unchanged