diff --git a/lib/utils/string.dart b/lib/utils/string.dart index 3f1e173..6e8c52a 100644 --- a/lib/utils/string.dart +++ b/lib/utils/string.dart @@ -4,3 +4,14 @@ String getAsSearchQuery(String category) { } return category; } + + +String createTag(String inputString) { + RegExp specialChars = RegExp(r'[^\w\s]', multiLine: true); + String tag = inputString.replaceAll(specialChars, '').toLowerCase(); + return tag; +} + +bool isNumeric(String str) { + return double.tryParse(str) != null; +}