Function HarmlessURLCoder->encode
Definitions
sources/urls_simplifier.php
- URL-encode a string (whole or partial URL) to be valid.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$str | string | No | No | required parameter | N/A | N/A | The input string |
Returns
- The encoded string
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* URL-encode a string (whole or partial URL) to be valid.
*
* @param string $str The input string
* @return string The encoded string
*/
public function encode(string $str) : string
* URL-encode a string (whole or partial URL) to be valid.
*
* @param string $str The input string
* @return string The encoded string
*/
public function encode(string $str) : string