JBZoo\Utils\Str::up PHP Method

up() public static method

Make a string uppercase
public static up ( string $string ) : string
$string string
return string
    public static function up($string)
    {
        if (self::isMBString()) {
            return mb_strtoupper($string, self::$encoding);
        } else {
            // @codeCoverageIgnoreStart
            return strtoupper($string);
            // @codeCoverageIgnoreEnd
        }
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * String to upper and trim
  *
  * @param $string
  * @return string
  *
  * @SuppressWarnings(PHPMD.ShortMethodName)
  */
 public static function up($string)
 {
     $cleaned = Str::up($string);
     $cleaned = Str::trim($cleaned);
     return $cleaned;
 }
All Usage Examples Of JBZoo\Utils\Str::up