mirror of
https://github.com/hanskokx/arcane_helper_utils.git
synced 2026-05-14 02:19:09 +02:00
v1.2.2
- Added additional `String` manipulation utilities, including: - `capitalizeWords`: Capitalizes the first letter of each word in the string. - `spacePascalCase`: Adds spaces between words in a PascalCase string. Signed-off-by: Hans Kokx <hans.kokx@hackberry.se>
This commit is contained in:
@@ -328,6 +328,20 @@ objects:
|
||||
final String capitalized = text.capitalize; // "Hello"
|
||||
```
|
||||
|
||||
- `capitalizeWords`: Capitalizes the first letter of each word in a given `String`
|
||||
|
||||
```dart
|
||||
String text = "hello world";
|
||||
String capitalizedWords = text.capitalizeWords; // "Hello World"
|
||||
```
|
||||
|
||||
- `spacePascalCase`: Adds spaces between words in a PascalCase `String`
|
||||
|
||||
```dart
|
||||
String text = "ArcaneHelperUtils";
|
||||
String spaced = text.spacePascalCase; // "Arcane Helper Utils"
|
||||
```
|
||||
|
||||
Additionally, the `CommonString` class provides a quick shortcut to common
|
||||
strings, such as punctuation marks that are otherwise cumbersome to find or type.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user