Kalkwst / MicroLib

MIT License
3 stars 0 forks source link

:sparkles: Text: Add WordUtils.Uncapitalize method #15

Closed Kalkwst closed 1 year ago

Kalkwst commented 1 year ago

Uncapitalize takes a string and an array of characters as input and returns the modified string where the first character of each word (sequence of characters separated by the specified delimiters) is converted to lowercase unless it is already in lowercase. If no delimiters are provided, the default delimiter is the space character.

Some possible use cases for this method are:

Normalizing the capitalization of a string for further processing or display. For example, you might want to display a title in sentence case (first letter of the first word in uppercase, the rest in lowercase) instead of the original title case (first letter of every word in uppercase). Modifying the capitalization of a string to match a specific style guide or convention. For example, you might want to convert a string written in all uppercase to title case or sentence case. Ensuring that the capitalization of a string matches the expected input format for a particular application or service. For example, you might want to make sure that the first letter of every word in a string is lowercase before sending it as a query to a search engine.