Informática Asociada ia doc & examples Index Examples List

Documentation jit ia\Util\Str Documentation Function examples Index Examples List

class ia\Util\Str


Index Documentation Function examples Index Examples List

ia\Util\Str


Examples by function ia\Util\Str Documentation Function examples Index Examples List

ia\Util\Str

Disclaimer: Auto generated file. Please help us setting parameters to useful values and extending the examples.

  • ia\Util\Str::strim(string $str) : string
    /**
         * superTrim trim (including \s utf spaces), and change multiple spaces to one space
         *
         * @param string $str
         * @return string
         */
    
    1. ia\Util\Str::strim('palabra'); -> palabra
  • ia\Util\Str::jsStrIt( $s) :
    
                    
    1. ia\Util\Str::jsStrIt(null /* == */); -> 
      null
  • ia\Util\Str::replacePos(string $palabra, string $replaceChar, int $n) : string
    /**
         * Reemplaza el caracter en posicion $n reemplazado por $replaceChar
         *
         * @param string $palabra
         * @param string $replaceChar
         * @param int $n
         * @return string con el caracter en posicion $n reemplazado por $replaceChar
         */
    
    1. ia\Util\Str::replacePos('palabra', 'palabra', 3); -> papalabraabra
  • ia\Util\Str::camel2Words( $s) :
    
                    
    1. ia\Util\Str::camel2Words(null /* == */); -> 
  • ia\Util\Str::camel2snake( $s) :
    
                    
    1. ia\Util\Str::camel2snake(null /* == */); -> 
  • ia\Util\Str::snake2camel( $s) :
    
                    
    1. ia\Util\Str::snake2camel(null /* == */); -> 
  • ia\Util\Str::toLabel( $s) :
    
                    
    1. ia\Util\Str::toLabel(null /* == */); -> 

      Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /lamp/www/iaLib/inc_ia/Util/src/Str.php on line 107

      Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /lamp/www/iaLib/inc_ia/Util/src/Str.php on line 109
  • ia\Util\Str::standarize(string $palabra) : string
    /**
         * Facilita comparar palabras: quitando espacios, acentos
         *
         * @param string $palabra
         * @return string $palabra in lowercase, unaccented, trimmed, punctuation chars to  spaces, only single spaces.
         */
    
    1. ia\Util\Str::standarize('palabra'); -> palabra
  • ia\Util\Str::strit(string $str, integer $maxLength = 0, bool $maxLengthInCharacters = true) : string
    /**
         * Quote and protect Sql value
         *
         * @param string $str
         * @param integer $maxLength
         * @param bool $maxLengthInCharacters
         * @return string
         *
         * @test "'El Gato' \'ap con slash \'ap con doble slash, un slash \ x".chr(8).chr(0).chr(26).chr(27)."y es 'felix'"
         */
    
    1. ia\Util\Str::strit('palabra'); -> 'palabra'
  • ia\Util\Str::stritc(string $str, integer $maxLength = 0, bool $maxLengthInCharacters = true) : string
    /**
         * Quote and protect Sql value followed by a coma
         *
         * @param string $str
         * @param integer $maxLength
         * @param bool $maxLengthInCharacters
         * @return string
         *
         * @test "'El Gato' \'ap con slash \'ap con doble slash, un slash \ x".chr(8).chr(0).chr(26).chr(27)."y es 'felix'"
         */
    
    1. ia\Util\Str::stritc('palabra'); -> 'palabra',
  • ia\Util\Str::strlike(string $str) : string
    /**
         * Protect a string to use in Sql like, so % and _ won't have a special value
         *
         * @param string $str
         * @return string
         */
    
    1. ia\Util\Str::strlike('palabra'); -> palabra
  • ia\Util\Str::fieldit(string $fieldName) : string
    /**
         * Protect with ` quotes a: column name to `column name` respecting . table.column to `table`.`column`
         *
         * @param string $fieldName
         * @return string
         */
    
    1. ia\Util\Str::fieldit('palabra'); -> `palabra`
  • ia\Util\Str::sqlNormalized(string $sql) : string
    /**
         * Generalize an Sql statement changing "parameters" to ?
         *
         * @param string $sql
         * @return string
         */
    
    1. ia\Util\Str::sqlNormalized('palabra'); -> palabra

End: ia\Util\Str Documentation Function examples Index Examples List