@Immutable
    public static Memory strchr(String haystack, char needle, boolean beforeNeedle) {
        int i = haystack.indexOf(needle);
        if (i >= 0) {
            return new StringMemory(beforeNeedle ? haystack.substring(0, i) : haystack.substring(i));
        } else
            return Memory.FALSE;
    }
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