You are here

protected static function kintVariableData::_substr in Devel 8.2

Same name and namespace in other branches
  1. 8 kint/kint/inc/kintVariableData.class.php \kintVariableData::_substr()
2 calls to kintVariableData::_substr()
kintParser::factory in kint/kint/inc/kintParser.class.php
* the only public entry point to return a parsed representation of a variable * * @static * *
kintParser::_parse_string in kint/kint/inc/kintParser.class.php

File

kint/kint/inc/kintVariableData.class.php, line 93

Class

kintVariableData

Code

protected static function _substr($string, $start, $end, $encoding = null) {
  if (function_exists('mb_substr')) {
    $encoding or $encoding = self::_detectEncoding($string);
    return mb_substr($string, $start, $end, $encoding);
  }
  else {
    return substr($string, $start, $end);
  }
}