getOptions($options, $cfg['DefaultTransformations']['Substring']); if ($options[1] != 'all') { $newtext = mb_substr( $buffer, $options[0], $options[1] ); } else { $newtext = mb_substr($buffer, $options[0]); } $length = mb_strlen($newtext); $baselength = mb_strlen($buffer); if ($length != $baselength) { if ($options[0] != 0) { $newtext = $options[2] . $newtext; } if (($length + $options[0]) != $baselength) { $newtext .= $options[2]; } } return htmlspecialchars($newtext); } /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */ /** * Gets the transformation name of the specific plugin * * @return string */ public static function getName() { return "Substring"; } }