
上QQ阅读APP看书,第一时间看更新
Controlling case
There are a lot of practical tasks where the modification of case is the most common approach. Let's pick a few of these:
- Case-insensitive comparison
- Beginning the sentence with an automatic first capital
- Camel-case to snake-case conversion
For these purposes, the strings package offers functions ToLower, ToUpper, ToTitle, and Title.