Lines Matching defs:string
15 /** @var string border between columns */
47 * @return string
58 * @param string $border
129 if ((string)intval($col) === (string)$col) {
184 * @param string[] $texts list of texts for each column
185 * @param array $colors A list of color names to use for each column. use empty string for default
186 * @return string
232 * Pad the given string to the correct length
234 * @param string $string
236 * @return string
238 protected function pad($string, $len)
240 $strlen = $this->strlen($string);
241 if ($strlen > $len) return $string;
244 return $string . str_pad('', $pad, ' ');
250 * @param $string
253 protected function strlen($string)
256 $string = preg_replace("/\33\\[\\d+(;\\d+)?m/", '', $string);
259 return mb_strlen($string, 'utf-8');
262 return strlen($string);
266 * @param string $string
269 * @return string
271 protected function substr($string, $start = 0, $length = null)
274 return mb_substr($string, $start, $length);
278 return substr($string, $start, $length);
280 return substr($string, $start);
286 * @param string $str
288 * @param string $break
290 * @return string