Skip to content

Commit 32c8f55

Browse files
committed
initial version
1 parent d8e1f28 commit 32c8f55

File tree

8 files changed

+734
-0
lines changed

8 files changed

+734
-0
lines changed

.gitignore

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
.dart_tool/
26+
.flutter-plugins
27+
.flutter-plugins-dependencies
28+
.packages
29+
.pub-cache/
30+
.pub/
31+
build/
32+
pubspec.lock
33+
34+
# Android related
35+
**/android/**/gradle-wrapper.jar
36+
**/android/.gradle
37+
**/android/captures/
38+
**/android/gradlew
39+
**/android/gradlew.bat
40+
**/android/local.properties
41+
**/android/**/GeneratedPluginRegistrant.java
42+
43+
# iOS/XCode related
44+
**/ios/**/*.mode1v3
45+
**/ios/**/*.mode2v3
46+
**/ios/**/*.moved-aside
47+
**/ios/**/*.pbxuser
48+
**/ios/**/*.perspectivev3
49+
**/ios/**/*sync/
50+
**/ios/**/.sconsign.dblite
51+
**/ios/**/.tags*
52+
**/ios/**/.vagrant/
53+
**/ios/**/DerivedData/
54+
**/ios/**/Icon?
55+
**/ios/**/Pods/
56+
**/ios/**/.symlinks/
57+
**/ios/**/profile
58+
**/ios/**/xcuserdata
59+
**/ios/.generated/
60+
**/ios/Flutter/App.framework
61+
**/ios/Flutter/Flutter.framework
62+
**/ios/Flutter/Flutter.podspec
63+
**/ios/Flutter/Generated.xcconfig
64+
**/ios/Flutter/app.flx
65+
**/ios/Flutter/app.zip
66+
**/ios/Flutter/flutter_assets/
67+
**/ios/Flutter/flutter_export_environment.sh
68+
**/ios/ServiceDefinitions.json
69+
**/ios/Runner/GeneratedPluginRegistrant.*
70+
71+
# Exceptions to above rules.
72+
!**/ios/**/default.mode1v3
73+
!**/ios/**/default.mode2v3
74+
!**/ios/**/default.pbxuser
75+
!**/ios/**/default.perspectivev3

.metadata

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: c1042314a94e693b4ea92404dab84852e9428442
8+
channel: master
9+
10+
project_type: package

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0-nullsafety.0
2+
3+
* initial version

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Super String
2+
3+
Dart's extension methods for String.
4+
5+
## Example:
6+
7+
```dart
8+
import 'package:super_string/super_string.dart';
9+
10+
void main() {
11+
print('THIS'.isUpperCase()); // => true
12+
print('this'.isLowerCase()); // => true
13+
print('This123'.isAlNum()); // => true
14+
print('This'.isAlpha()); // => true
15+
print('123'.isInteger()); // => true
16+
print('123This'.isIdentifier()); // => false
17+
print('This_123'.isIdentifier()); // => true
18+
print('tHiS iS tiTle'.title()); // => 'This Is Title'
19+
print('tHiS'.swapcase()); // => 'ThIs'
20+
print('This'.charAt(0)); // => 'T'
21+
print('this'.similarity('THis')); // => 2
22+
print('this'.capitalize()); // => 'This'
23+
print('this'.center(7,'0')); // => '00this0'
24+
print('this'.count('t')); // => 1
25+
print('a\ta'.expandTabs(2)); // => 'a a'
26+
}
27+
```

example/main.dart

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import 'package:super_string/super_string.dart';
2+
3+
void main() {
4+
5+
/// [isUpperCase]
6+
print('this'.isUpperCase); // => false
7+
print('THIS'.isUpperCase); // => true
8+
9+
/// [isLowerCase]
10+
print('this'.isLowerCase); // => true
11+
print('THIS'.isLowerCase); // => false
12+
13+
/// [isAlNum]
14+
print('This123'.isAlNum); // => true
15+
print('123'.isAlNum); // => true
16+
print('This@123'.isAlNum); // => false
17+
18+
/// [isAlpha]
19+
print('This'.isAlpha); // => true
20+
print('A1'.isAlpha); // => false
21+
print('This@123'.isAlpha); // => false
22+
23+
/// [isInteger]
24+
print('This123'.isInteger); // => false
25+
print('123'.isInteger); // => true
26+
print('This@123'.isInteger); // => false
27+
28+
/// [isIdentifier]
29+
print('This123'.isIdentifier); // => true
30+
print('This 123'.isIdentifier); // => false
31+
print('123This'.isIdentifier); // => false
32+
print('This@123'.isIdentifier); // => false
33+
print('This_123'.isIdentifier); // => true
34+
35+
/// [title]
36+
print('this123'.title()); // => 'This123'
37+
print('This is title'.title()); // => 'This Is Title'
38+
print('tHiS iS tiTle'.title()); // => 'This Is Title'
39+
40+
/// [swapcase]
41+
print('tHiS'.swapcase()); // => 'ThIs'
42+
print('HeLlO'.swapcase()); // => 'hElLo'
43+
44+
/// [charAt]
45+
print('This'.charAt(0)); // => 'T'
46+
print('This'.charAt(3)); // => 's'
47+
48+
/// [similarity]
49+
print('This'.similarity('This')); // => 4
50+
print('this'.similarity('THis')); // => 2
51+
52+
/// [capitalize]
53+
print('this'.capitalize()); // => 'This'
54+
print('THIS'.capitalize()); // => 'This'
55+
56+
/// [center]
57+
print('this'.center(6)); // => ' this ';
58+
print('this'.center(7,'0')); // => '00this0'
59+
60+
/// [count]
61+
print('this'.count('t')); // => 1
62+
print('hello'.count('l')); // => 2
63+
print('hello'.count('l',0,3)); // => 1
64+
65+
/// [expandTabs]
66+
print('a\ta'.expandTabs()); // => 'a a'
67+
print('a\ta'.expandTabs(2)); // => 'a a'
68+
}

0 commit comments

Comments
 (0)