public static Memory str_split(String string, int chunk) {
        ArrayMemory array = new ArrayMemory();

        if (string.isEmpty()) {
            array.add(new StringMemory(string));
            return array;
        }

        int strLen = string.length();
        for (int i = 0; i < strLen; i += chunk) {
            String value;

            if (i + chunk <= strLen) {
                value = string.substring(i, i + chunk);
            } else {
                value = string.substring(i);
            }

            array.add(new StringMemory(value));
        }

        return array;
    }
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