charCount method
Get the number of characters in a string.
Implementation
int charCount() {
if (this == null) {
throw ArgumentError('string: $this');
}
if (this!.isEmpty) {
return 0;
}
return this!.length;
}
Get the number of characters in a string.
int charCount() {
if (this == null) {
throw ArgumentError('string: $this');
}
if (this!.isEmpty) {
return 0;
}
return this!.length;
}