1 bootstrap.inc | backdrop_base64_encode($string) |
Returns a URL-safe, base64 encoded version of the supplied string.
Parameters
$string: The string to convert to base64.
Return value
string:
File
- core/
includes/ bootstrap.inc, line 2610 - Functions that need to be loaded on every Backdrop request.
Code
function backdrop_base64_encode($string) {
$data = base64_encode($string);
// Modify the output so it's safe to use in URLs.
return strtr($data, array('+' => '-', '/' => '_', '=' => ''));
}