string_capitalize
0.0.10, released 4 years ago by an unverified publisher
Extension to capitalize strings and list items.
WASM-ready
What it does
Provides methods to capitalize the first letter of a string, each word in a string, and each item in a list of strings. It also includes a startsWithCapital check.
AI-written summary of version 0.0.10, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to capitalize the first letter of a word
- Need title‑case conversion for a string
- Need to capitalize each element of a List<String>
Skip it when
- Working with complex locale‑aware capitalization
- Need to manipulate strings beyond simple capitalization
Strengths
- No external dependencies
- Simple API
- Works across all Dart platforms
Weaknesses
- Limited to basic capitalization, no locale support
- No advanced string manipulation features
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
```dart
import 'package:string_capitalize/string_capitalize.dart';
void main() {
final s = 'hello world';
print(s.capitalize()); // Hello world
print(s.capitalizeEach()); // Hello World
final list = ['foo', 'bar'];
print(list.capitalize()); // [Foo, Bar]
}
```Alternatives
Packages that do the same job and could replace string_capitalize.
- validators2
String validation and sanitization for Dart.
83Compare - extension_utils
Dart and Flutter extension library for strings, collections, dates, numbers, and colors.
74Compare - kartal
Collection of Dart and Flutter extensions for context, primitive variables, and common utilities.
71Compare - numerus
Translate integers to Roman numerals and Roman numeral strings to integers in Dart.
63Compare