TypeScript Type-Exercises 2
4 January, 2024
There are some type exercise about string literal type.
Spilt String into Chars
Trim, TrimStart, TrimEnd
Lowercase To Uppercase
With the akin method, we also make a UppercaseToLowercase
type definition.
Capitalize
Replace
It replace the first matched char.
Replace All
Replace all matched chars.