basic implementation of shId()

Sun, 17 Sep 2023 13:26:22 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 17 Sep 2023 13:26:22 +0200
changeset 64
00586d892855
parent 63
ac47c2fb2c4a
child 65
6db50c6df6e3

basic implementation of shId()

src/main/java/de/unixwork/uwproj/Util.java file | annotate | diff | comparison | revisions
--- a/src/main/java/de/unixwork/uwproj/Util.java	Sun Sep 17 13:03:46 2023 +0200
+++ b/src/main/java/de/unixwork/uwproj/Util.java	Sun Sep 17 13:26:22 2023 +0200
@@ -41,7 +41,6 @@
      * @return the sanitized string
      */
     public static String shId(String s) {
-        // TODO: implement
-        return s;
+        return s.replaceAll("[^A-Za-z0-9_]", "_");
     }
 }

mercurial