private static Set<String> getAllowedTags(String str) {
        int len = str.length();

        Set<String> set = new HashSet<String>();

        for (int i = 0; i < len; i++) {
            char ch = str.charAt(i);

            switch (ch) {
                case '<':
                    int j = i + 1;
                    while (j < len
                        && (ch = str.charAt(j)) != '>'
                        //&& ch != '/'
                        && !Character.isWhitespace(ch)) {
                        j++;
                    }
                    if (ch == '>'
                        && i + 1 < j
                        && j < len) {
                        set.add(str.substring(i + 1, j));
                    }

                    i = j;
                default:
                    continue;
            }

        }
        return set;
    }
Parses the cslashes bitmap returning an actual bitmap.

@param charset the bitmap string

@return the actual bitmap
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/StringFunctions.java