public static void replaceNonWordChars(StringValue string, char replacement) {
        final char[] chars = string.getCharArray();
        final int len = string.length();

        for (int i = 0; i < len; i++) {
            final char c = chars[i];
            if (!(Character.isLetter(c) || Character.isDigit(c) || c == '_')) {
                chars[i] = replacement;
            }
        }
    }
@Test
    void testReplaceNonWordChars() {
        StringValue testString = new StringValue("TEST123_@");
        StringValueUtils.replaceNonWordChars(testString, '!');
        assertThat((Object) testString).isEqualTo(new StringValue("TEST123_!"));
    }