mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-28 10:28:58 -05:00
refactor: using string extension
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
import 'dart:convert';
|
||||
|
||||
extension MyString<T extends String> on String {
|
||||
int get toInt {
|
||||
return int.parse(this);
|
||||
}
|
||||
|
||||
String get urlencode {
|
||||
return Uri.encodeComponent(this);
|
||||
}
|
||||
|
||||
String get urldecode {
|
||||
return Uri.decodeComponent(this);
|
||||
}
|
||||
int get toInt => int.parse(this);
|
||||
String get urlencode => Uri.encodeComponent(this);
|
||||
String get urldecode => Uri.decodeComponent(this);
|
||||
String get dropLineBreak => this.replaceAll('\n', '');
|
||||
String get base64ToUtf8 => utf8.decode(base64.decode(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user