protected function removeChar($string, $charStart = null, $charEnd = null)
    {
        if (!is_null($charStart) && (is_string($charStart) || is_array($charStart))) {
            if (is_string($charStart)) {
                $charStart = [$charStart];
            }

            foreach ($charStart as $char) {
                if (substr($string, 0, 1) === $char) {
                    $string = substr($string, 1);
                }
            }
        }

        if (!is_null($charEnd) && (is_string($charEnd) || is_array($charEnd))) {
            if (is_string($charEnd)) {
                $charEnd = [$charEnd];
            }

            foreach ($charEnd as $char) {
                if (substr($string, -1) === $char) {
                    $string = substr($string, 0, -1);
                }
            }
        }

        return $string;
    }