super_string 1.0.0-nullsafety.1 super_string: ^1.0.0-nullsafety.1 copied to clipboard
Some of the most common and useful string methods, Inspired by various other programming languages.
Super String #
Some of the most common and useful string methods, Inspired by various other programming languages.
Example: #
import 'package:super_string/super_string.dart';
void main() {
print('THIS'.isUpperCase); // => true
print('this'.isLowerCase); // => true
print('This123'.isAlNum); // => true
print('This'.isAlpha); // => true
print('123'.isInteger); // => true
print('123This'.isIdentifier); // => false
print('This_123'.isIdentifier); // => true
print('tHiS iS tiTle'.title()); // => 'This Is Title'
print('tHiS'.swapcase()); // => 'ThIs'
print('This'.charAt(0)); // => 'T'
print('this'.similarity('THis')); // => 2
print('this'.capitalize()); // => 'This'
print('this'.center(7,'0')); // => '00this0'
print('this'.count('t')); // => 1
print('a\ta'.expandTabs(2)); // => 'a a'
}
Usage: #
Command | Description |
---|---|
isUpperCase | Check if the characters are in UpperCase |
isLowerCase | Check if the characters are in LowerCase |
isAlNum | Check if the characters contains only Alphabets and Numbers |
isAlpha | Check if the characters contains only Alphabets |
isInteger | Check if the characters contains only Numbers |
isIdentifier | Check if the characters contains only Alphabets,Numbers and underscore( _ ) |
title() | Convert only the first character of every words into UpperCase |
swapcase() | Convert UpperCase into LowerCase and vice versa |
charAt() | Return a character of a specified index |
similarity() | Count the number of common letter in both String |
capitalize() | Convert the first character of String into UpperCase |
center() | Return a centered string |
count() | Count the number of times a specified value occurs in a string |
expandTabs() | Sets the tab size of the string |
Features, Bugs and Contributing #
If you encounter any bug or feature request, feel free to create a issue. If you want to contribute to this project select one of the issue and starting working on it.