summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared/string-helpers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/shared/string-helpers.ts')
-rw-r--r--gui/src/shared/string-helpers.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/gui/src/shared/string-helpers.ts b/gui/src/shared/string-helpers.ts
index c69ebddfcf..983a8e8796 100644
--- a/gui/src/shared/string-helpers.ts
+++ b/gui/src/shared/string-helpers.ts
@@ -5,3 +5,7 @@ export function capitalize(inputString: string): string {
export function capitalizeEveryWord(inputString: string): string {
return inputString.split(' ').map(capitalize).join(' ');
}
+
+export function removeNonNumericCharacters(value: string) {
+ return value.replace(/[^0-9]/g, '');
+}