trim_slashes()
trim_slashes( $str) : string
Trim Slashes
Removes any leading/trailing slashes from a string:
/this/that/theother/
becomes:
this/that/theother
Parameters
$str |
CodeIgniter
An open source application development framework for PHP
This content is released under the MIT License (MIT)
Copyright (c) 2014 - 2016, British Columbia Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
strip_slashes( $str) : mixed
Strip Slashes
Removes slashes contained in a string or in an array
$str |
string or array
package |
CodeIgniter |
---|
strip_quotes( $str) : string
Strip Quotes
Removes single and double quotes from a string
$str |
package |
CodeIgniter |
---|
quotes_to_entities( $str) : string
Quotes to Entities
Converts single and double quotes to entities
$str |
package |
CodeIgniter |
---|
reduce_double_slashes( $str) : string
Reduce Double Slashes
Converts double slashes in a string to a single slash, except those found in http://
http://www.some-site.com//index.php
becomes:
http://www.some-site.com/index.php
$str |
package |
CodeIgniter |
---|
reduce_multiples( $str, $character = ',', $trim = FALSE) : string
Reduce Multiples
Reduces multiple instances of a particular character. Example:
Fred, Bill,, Joe, Jimmy
becomes:
Fred, Bill, Joe, Jimmy
$str | ||
$character | ||
$trim |
package |
CodeIgniter |
---|
random_string( $type = 'alnum', $len = 8) : string
Create a Random String
Useful for generating passwords or hashes.
$type | ||
$len |
package |
CodeIgniter |
---|
increment_string( $str, $separator = '_', $first = 1) : string
Add's _1 to a string or increment the ending number to allow _2, _3, etc
$str | ||
$separator | ||
$first |
package |
CodeIgniter |
---|
alternator() : string
Alternator
Allows strings to be alternated. See docs...
package |
CodeIgniter |
---|