@Immutable
    public static Memory strpos(Environment env, TraceInfo trace, String haystack, Memory needle, int offset) {
        int haystackLen = haystack.length();
        if (offset < 0 || offset > haystackLen) {
            env.warning(trace, "strpos(): Offset not contained in string");
            return Memory.FALSE;
        }

        if (haystackLen == 0)
            return Memory.FALSE;

        char ch = '\0';
        String search = null;
        if (needle.isString()) {
            search = needle.toString();
            if (search.length() == 1) {
                ch = search.charAt(0);
                search = null;
            }
        } else {
            ch = needle.toChar();
        }

        int p;
        if (search == null) {
            p = haystack.indexOf(ch, offset);
        } else {
            if (search.isEmpty()) {
                env.warning(trace, "Empty needle");
                return Memory.FALSE;
            }
            p = haystack.indexOf(search, offset);
        }

        if (p < 0)
            return Memory.FALSE;
        else
            return LongMemory.valueOf(p);
    }
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