FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
common-string.php File Reference

Common function to handle strings. More...

Go to the source code of this file.

Functions

if(!defined('ENT_SUBSTITUTE')) convertToUTF8 ($content, $toHTML=true)
 
 checkUTF8 ($content)
 
 tryConvertToUTF8 ($content)
 

Detailed Description

Common function to handle strings.

Definition in file common-string.php.

Function Documentation

checkUTF8 (   $content)

Check if the given string is already UTF-8 encoded

Parameters
string$contentString to check
Returns
boolean True if encoded in UTF-8, false otherwise

Definition at line 61 of file common-string.php.

if (!defined('ENT_SUBSTITUTE')) convertToUTF8 (   $content,
  $toHTML = true 
)

Convert string to UTF-8

Parameters
string$contentString to be converted
bool$toHTMLTrue to return HTML compatible strings
Returns
string UTF8 converted string

Definition at line 36 of file common-string.php.

tryConvertToUTF8 (   $content)

Try to convert a string to UTF-8 encoded string

Parameters
string$contentString to be converted
Returns
boolean|string UTF-8 converted string, false if cannot be converted

Definition at line 71 of file common-string.php.