6. Common methods - adwins/Arrayer GitHub Wiki

6. Common methods.

Introduction

Common methods.

Details

/**
 * Counts the length of a string value.
 */
int $arrayer->var->length();

/**
 * Counts the bytes of a string value.
 */
int $arrayer->var->bytes();



/**
 * String manipulation methods affects to the same Arrayer object, returning it.
 */


/**
 * Cleans the object.
 */
$arrayer->var->clean();

/**
 * Trims the object.
 */
$arrayer->var->trim([ $charlist = '']);

/**
 * Strips tags off.
 */
$arrayer->var->strip([ $allowable_tags = '']);

/**
 * Strips slashes.
 *
 * @return Arrayer
 */
$arrayer->var->stripslashes();

/**
 * Adds slashes.
 */
$arrayer->var->addslashes();

/**
 * Transform to lower case.
 */
$arrayer->var->to_lower();

/**
 * Transform to upper case.
 */
$arrayer->var->to_upper();

/**
 * Pads the string value with a given string ($string) to speciefied length ($len).
 */
$arrayer->var->pad($len [, $string = ' ' [, $type = STR_PAD_RIGHT ] ]);

/**
 * Replaces $search to $replace.
 */
$arrayer->var->replace($search, $replace);

/**
 * Converts the object from a charset $from to a charset $to.
 */
$arrayer->var->conv_from($from [ , $to = self::CHARSET ]);

/**
 * Converts the object to a charset $to from a charset $from.
 */
$arrayer->var->conv_to($to [ , $from = self::CHARSET ]);

/**
 * Concatenates a given string (strings, array of strings) to the string value.
 */
$arrayer->var->concat(mixed $string [ , mixed $string [, ... ] ]);


⚠️ **GitHub.com Fallback** ⚠️