2
/* $Id: text_plain__substr.inc.php 5523 2004-03-09 15:02:28Z nijel $ */
3
// vim: expandtab sw=4 ts=4 sts=4:
5
function PMA_transformation_text_plain__substr($buffer, $options = array(), $meta = '') {
6
// possibly use a global transform and feed it with special options:
7
// include('./libraries/transformations/global.inc.php');
9
// further operations on $buffer using the $options[] array.
10
if (!isset($options[0]) || $options[0] == '') {
14
if (!isset($options[1]) || $options[1] == '') {
18
if (!isset($options[2]) || $options[2] == '') {
23
if ($options[1] != 'all') {
24
$newtext = PMA_substr($buffer, $options[0], $options[1]);
26
$newtext = PMA_substr($buffer, $options[0]);
29
$length = strlen($newtext);
30
$baselength = strlen($buffer);
31
if ($length != $baselength) {
32
if ($options[0] != 0) {
33
$newtext = $options[2] . $newtext;
36
if (($length + $options[0]) != $baselength) {
37
$newtext .= $options[2];