14 if (!defined(
'IN_PEEL')) {
18 $GLOBALS[
'ucfirsts'] = array(
'zh' =>
false,
'ja' =>
false);
36 public static function strlen($string)
38 if (function_exists(
'mb_strlen') && GENERAL_ENCODING !=
'iso-8859-1') {
39 return mb_strlen($string);
54 public static function strpos($haystack, $needle, $offset = 0)
56 if($needle!==
'' && $needle!== null) {
57 if (function_exists(
'mb_strpos')) {
58 return mb_strpos($haystack, $needle, $offset);
60 return strpos($haystack, $needle, $offset);
76 public static function strrpos($haystack, $needle, $offset = 0)
83 if (function_exists(
'mb_strrpos')) {
85 return mb_strrpos($haystack, $needle);
86 }
elseif (version_compare(PHP_VERSION,
'5.2.0',
'>=')) {
88 return mb_strrpos($haystack, $needle, $offset);
89 }
elseif (version_compare(PHP_VERSION,
'5.0.0',
'>=')) {
91 return strrpos($haystack, $needle, $offset);
97 return strrpos($haystack, $needle);
99 return strrpos($haystack, $needle, $offset);
114 if (function_exists(
'mb_substr')) {
115 if ($length !== null) {
116 return mb_substr($string,
$start, $length);
118 return mb_substr($string,
$start);
121 if ($length !== null) {
137 if(empty(
$GLOBALS[
'site_parameters'][
'string_case_change_forbidden']) || empty(
$GLOBALS[
'site_parameters'][
'string_case_change_forbidden'][
$_SESSION[
'session_langue']])) {
138 if (function_exists(
'mb_strtolower')) {
139 return mb_strtolower($string);
156 if(empty(
$GLOBALS[
'site_parameters'][
'string_case_change_forbidden']) || empty(
$GLOBALS[
'site_parameters'][
'string_case_change_forbidden'][
$_SESSION[
'session_langue']])) {
157 if (function_exists(
'mb_strtoupper')) {
158 return mb_strtoupper($string);
175 if(empty(
$GLOBALS[
'site_parameters'][
'string_case_change_forbidden']) || empty(
$GLOBALS[
'site_parameters'][
'string_case_change_forbidden'][
$_SESSION[
'session_langue']])) {
176 if (function_exists(
'mb_ucfirst')) {
177 return mb_ucfirst($string);
196 if (function_exists(
'mb_substr_count')) {
197 return mb_substr_count($string, $searched);
214 $right_string = $string;
217 $left_string .=
String::substr($right_string, 0, $max_part_length) . $separator;
220 return $left_string.$right_string;
233 public static function str_shorten($string, $length_limit, $middle_separator =
'', $ending_if_no_middle_separator =
'...', $ideal_length_with_clean_cut_if_possible = null)
236 if (!empty($ideal_length_with_clean_cut_if_possible) && $length > $ideal_length_with_clean_cut_if_possible) {
238 $middle_separator = null;
239 foreach(array(
'.',
'!',
'?',
';',
':',
',',
' ',
'=',
'+',
'-',
'{',
'}',
'[',
']',
'(',
')',
'<',
'>',
'_',
'#',
'*') as $this_separator) {
241 $possible_cut =
String::strpos($string, $this_separator, $ideal_length_with_clean_cut_if_possible);
242 if ($possible_cut !==
false && $possible_cut < $length_limit -
String::strlen($ending_if_no_middle_separator)) {
244 $length_limit = $possible_cut +
String::strlen($ending_if_no_middle_separator);
246 $middle_separator = null;
252 if (!empty($middle_separator)) {
255 $ending = $ending_if_no_middle_separator;
260 }
elseif ($length > $length_limit) {
263 if (!empty($middle_separator)) {
265 $cut_start = ceil(($length - $cut_size) / 2);
277 $cut_start = $length - $cut_size;
285 $string = $beginning_text . $middle_separator . $ending_text . $ending;
305 public static function str_shorten_words($string, $length_limit = 100, $separator =
" ", $force_shorten_if_special_content =
false, $add_separator_instead_of_cutting =
true)
308 $sentences_array = explode(
"\n", $string);
309 foreach($sentences_array as $this_main_sentence_key => $this_main_sentence) {
310 $string_array = explode(
"\t", $this_main_sentence);
311 foreach($string_array as $this_main_key => $this_main_string) {
312 $tab = explode(
' ', $this_main_string);
313 foreach($tab as $key => $this_string) {
317 if($add_separator_instead_of_cutting) {
324 $string_array[$this_main_key] = implode(
' ', $tab);
327 $sentences_array[$this_main_sentence_key] = implode(
"\t", $string_array);
329 $string = implode(
"\n", $sentences_array);
341 public static function convert_accents($string, $convert_umlaut =
false, $strip_umlaut =
true)
343 $string = str_replace(array(
'à',
'á',
'â',
'ã',
'å'),
'a', $string);
344 $string = str_replace(array(
'À',
'Á',
'Â',
'Ã',
'Å'),
'A', $string);
345 $string = str_replace(array(
'è',
'é',
'ê',
'ë'),
'e' , $string);
346 $string = str_replace(array(
'È',
'É',
'Ê',
'Ë'),
'E' , $string);
347 $string = str_replace(array(
'ì',
'í',
'î',
'ï'),
'i' , $string);
348 $string = str_replace(array(
'Ì',
'Í',
'Î',
'Ï'),
'I' , $string);
349 $string = str_replace(array(
'ò',
'ó',
'ô',
'õ',
'ø'),
'o' , $string);
350 $string = str_replace(array(
'Ò',
'Ó',
'Ô',
'Õ',
'Ø'),
'O' , $string);
351 $string = str_replace(array(
'ù',
'ú',
'û'),
'u' , $string);
352 $string = str_replace(array(
'Ù',
'Ú',
'Û'),
'U' , $string);
353 $string = str_replace(array(
'æ',
'œ',
'ý',
'ÿ',
'ç',
'ß',
'ñ'), array(
'ae',
'oe',
'y',
'y',
'c',
'ss',
'n'), $string);
354 $string = str_replace(array(
'Æ',
'Œ',
'Ý',
'Ÿ',
'Ç',
'ß',
'Ñ'), array(
'AE',
'OE',
'Y',
'Y',
'C',
'SS',
'N'), $string);
355 if ($convert_umlaut) {
356 $string = str_replace(array(
'ä',
'ö',
'ü'), array(
'ae',
'oe',
'ue'), $string);
357 $string = str_replace(array(
'Ä',
'Ö',
'Ü'), array(
'AE',
'OE',
'UE'), $string);
358 }
elseif ($strip_umlaut) {
359 $string = str_replace(array(
'ä',
'ö',
'ü'), array(
'a',
'o',
'u'), $string);
360 $string = str_replace(array(
'Ä',
'Ö',
'Ü'), array(
'A',
'O',
'U'), $string);
378 $original_encoding =
strtolower($original_encoding);
379 if (empty($original_encoding)) {
380 $original_encoding = GENERAL_ENCODING;
384 if ($new_encoding == $original_encoding) {
386 }
elseif ($new_encoding ==
'iso-8859-1' && $original_encoding ==
'utf-8') {
387 $euro_iso = mb_convert_encoding(
'€',
"CP1252",
'utf-8');
388 return str_replace(
'-,/)[_', $euro_iso, utf8_decode(str_replace(
'€',
'-,/)[_', $string)));
389 }
elseif ($new_encoding ==
'utf-8' && $original_encoding ==
'iso-8859-1') {
391 }
elseif (function_exists(
'mb_convert_encoding') && (!function_exists(
'mb_list_encodings') || (in_array(
String::strtoupper($new_encoding), mb_list_encodings()) && in_array(
String::strtoupper($original_encoding), mb_list_encodings())))) {
392 return mb_convert_encoding($string, $new_encoding, $original_encoding);
411 public static function htmlentities ($string, $flags = ENT_COMPAT, $charset = GENERAL_ENCODING, $suppr_endline =
false, $encode_only_isolated_amperstands =
false, $decode_html_entities_first =
false)
413 if ($suppr_endline) {
414 $string = str_replace(array(
"\r",
"\n"),
' ', $string);
416 if ($decode_html_entities_first) {
420 $string = str_replace(array(
'•',
'™',
'€',
'’'), array(
'',
'',
'€',
"'"), $string);
421 if ($encode_only_isolated_amperstands) {
424 $string = str_replace(
'&amp;',
'&', preg_replace(
'/&(?!#?[xX]?([0-9a-zA-Z]{1,9});)/',
'&', $string));
429 $string = preg_replace(
'/&(?=#?[xX]?([0-9a-zA-Z]{1,9});)/',
'&',
htmlentities($string, $flags, $charset));
455 public static function str_htmlentities($string, $suppr_endline =
false, $encode_only_isolated_amperstands =
false)
457 return String::htmlentities($string, ENT_COMPAT, GENERAL_ENCODING, $suppr_endline, $encode_only_isolated_amperstands);
468 public static function textEncode($string, $suppr_endline =
false, $encode_only_isolated_amperstands =
false)
470 return String::htmlentities($string, ENT_COMPAT, GENERAL_ENCODING, $suppr_endline, $encode_only_isolated_amperstands);
482 if (function_exists(
'html_entity_decode') && (version_compare(PHP_VERSION,
'5.0.0',
'>=') || GENERAL_ENCODING ==
'iso-8859-1')) {
489 return str_replace(
'"',
'"', $value);
502 $translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $style));
503 if ($style === ENT_QUOTES) {
504 $translation[
'''] =
'\'';
506 return strtr($string, $translation);
517 public static function html_entity_decode($string, $quote_style = ENT_COMPAT, $charset = GENERAL_ENCODING)
519 if (version_compare(PHP_VERSION,
'5.0.0',
'>=')) {
535 if (!empty(
$GLOBALS[
'site_parameters'][
'compatibility_mode_with_htmlentities_encoding_content']) &&
String::strpos($string,
'<') ===
false) {
548 public static function strip_tags($string, $allowed_tags = null)
550 return str_replace(array(
' - - - ',
' - - '),
' - ', str_replace(array(
"\n\n\n\n\n",
"\n\n\n\n",
"\n\n\n",
' ',
' ',
' ',
' '), array(
"\n\n",
"\n\n",
"\n\n",
' ',
' ',
' ',
' '),
strip_tags(str_replace(array(
'<br />',
'<br>',
'</p>',
'</td>',
'</tr>',
'</div>',
'</h3>',
'</h4>'), array(
"\n",
"\n",
"\n",
' ',
' ',
' ',
' ',
' '), str_replace(array(
'<h1',
'</h1>',
'<h2',
'</h2>',
'<li',
"\t",
"\r\n",
"\r"), array(
' - <h1',
'</h1> - ',
' - <h2',
'</h2> - ',
"\n- <li",
' ',
"\n",
"\n"), $string)), $allowed_tags)));
568 if ($has_no_br && $has_no_p && $has_no_table && $has_no_ul && $has_no_script && $has_no_div) {
569 $string = str_replace(array(
"\n"),
"<br />\n", str_replace(array(
"\r\n",
"\r"),
"\n", $string));
583 return preg_match(
'%(?:
584 [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
585 |\xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
586 |[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
587 |\xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
588 |\xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
589 |[\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
590 |\xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
604 $cp1252_map = array(
"\xc2\x80" =>
"\xe2\x82\xac",
605 "\xc2\x82" =>
"\xe2\x80\x9a",
606 "\xc2\x83" =>
"\xc6\x92",
607 "\xc2\x84" =>
"\xe2\x80\x9e",
608 "\xc2\x85" =>
"\xe2\x80\xa6",
609 "\xc2\x86" =>
"\xe2\x80\xa0",
610 "\xc2\x87" =>
"\xe2\x80\xa1",
611 "\xc2\x88" =>
"\xcb\x86",
612 "\xc2\x89" =>
"\xe2\x80\xb0",
613 "\xc2\x8a" =>
"\xc5\xa0",
614 "\xc2\x8b" =>
"\xe2\x80\xb9",
615 "\xc2\x8c" =>
"\xc5\x92",
616 "\xc2\x8e" =>
"\xc5\xbd",
617 "\xc2\x91" =>
"\xe2\x80\x98",
618 "\xc2\x92" =>
"\xe2\x80\x99",
619 "\xc2\x93" =>
"\xe2\x80\x9c",
620 "\xc2\x94" =>
"\xe2\x80\x9d",
621 "\xc2\x95" =>
"\xe2\x80\xa2",
622 "\xc2\x96" =>
"\xe2\x80\x93",
623 "\xc2\x97" =>
"\xe2\x80\x94",
624 "\xc2\x98" =>
"\xcb\x9c",
625 "\xc2\x99" =>
"\xe2\x84\xa2",
626 "\xc2\x9a" =>
"\xc5\xa1",
627 "\xc2\x9b" =>
"\xe2\x80\xba",
628 "\xc2\x9c" =>
"\xc5\x93",
629 "\xc2\x9e" =>
"\xc5\xbe",
630 "\xc2\x9f" =>
"\xc5\xb8"
651 public static function getCleanHTML($text, $max_width = null, $allow_form =
false, $allow_object =
false, $allow_class =
false, $additional_config = null, $safe =
true, $additional_elements = null, $max_caracters_length = 50000, $max_octets_length = 59000, $max_word_and_url_length = 100)
653 require_once(
$GLOBALS[
'dirroot'] .
"/lib/fonctions/htmlawed.php");
657 $text = trim(str_replace(array(
'’',
' lang="EN-GB"',
' lang=EN-GB',
' mso-ansi-language: EN-GB',
'<span>',
'<SPAN>',
'<font>',
'<FONT>',
'<strong></strong>',
'<b></b>',
'<STRONG></STRONG>',
'<B></B>',
658 "</td><br /><td",
"<br />\n<td",
"<br />\r\n<td",
'<br /><td',
'</td><br />',
"<br />\n<tr",
"<br />\r\n<tr",
'<br /><tr',
'</tr><br />',
659 "</TD><br /><TD",
"<br />\n<TD",
"<br />\r\n<TD",
'<br /><TD',
"<br />\n<TR",
"<br />\r\n<TR",
'<br /><TR',
'<TR><br />',
'<tr><br />',
660 'face=\'"arial,\'',
'sans-serif?',
"<br /><LI",
'<br /><TBODY>',
'<br /><tbody>',
'<TBODY><br />',
'<tbody><br />',
'<br /><COL',
'<br /><col' ,
'<HR>',
' style=""',
'<font>',
'<span>',
'<em><em>',
'<b><b>',
'<u><u>',
'<i><i>',
661 ' ',
' ',
' ',
' ',
' ',
' class=MsoNormal',
' class="MsoNormal"',
' style="mso-bidi-font-weight: normal"',
' style=""',
' align=""',
662 '...',
'-----',
'_____',
':',
' ',
'\\'),
663 array(
"'",
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
664 "</td><td",
"\n<td",
"\n<td",
'<td',
'</td>',
"\n<tr",
"\n<tr",
'<tr',
'</tr>',
665 "</TD><TD",
"\n<TD",
"\n<TD",
'<TD',
"\n<TR",
"\n<TR",
'<TR',
'<TR>',
'<tr>',
666 'face=\'arial\'',
'sans-serif',
"<LI",
'<TBODY>',
'<tbody>',
'<TBODY>',
'<tbody>',
'<COL',
'<col' ,
'<hr />',
'',
'',
'',
'<em>',
'<b>',
'<u>',
'<i>',
667 ' ',
' ',
' ',
' ',
' ',
'',
'',
'',
'',
'',
668 '... ',
'----- ',
'_____ ',
': ',
' ',
''),
672 $text = str_replace(array(
': //',
': 808'), array(
'://',
':808'), $text);
673 if(!empty($max_caracters_length) &&
String::strlen(
vb($text)) > $max_caracters_length * 1.1) {
677 if(!empty($max_octets_length) &&
String::strlen(
vb($text)) > $max_octets_length * 1.1) {
680 $text =
substr($text, 0, $max_octets_length);
684 $html_config[
'clean_ms_char'] = 0;
685 $html_config[
'schemes'] =
'href: ftp, http, https, mailto; classid:clsid; *:http, https, data';
688 $html_config[
'safe'] = 1;
690 $html_config[
'comment'] = 1;
692 $html_config[
'elements'] =
'*' . ($allow_object?
'+object':
'') .
'' . ($allow_form?
'':
'-form') .
'+embed-rb-rbc-rp-rt-rtc-ruby' . $additional_elements;
693 $html_config[
'make_tag_strict'] = 0;
694 $html_config[
'no_deprecated_attr'] = 0;
695 if (empty($allow_class)) {
696 if (empty($html_config[
'deny_attribute'])) {
697 $html_config[
'deny_attribute'] =
'class';
699 $html_config[
'deny_attribute'] .=
',class';
702 if (!empty($additional_config)) {
703 $html_config += $additional_config;
729 $text_clean = htmLawed($text, $html_config);
731 if (!empty($max_width)) {
733 foreach(array(
'width="' => array(
'"'),
'width = "' => array(
'"'),
"width='" => array(
"'"),
"width = '" => array(
"'"),
'width:' => array(
';',
'"',
"'"),
'width :' => array(
';',
'"',
"'"),
'position:' => array(
';',
'"',
"'"),
'position :' => array(
';',
'"',
"'"),
'font-size :' => array(
';',
'"',
"'"),
'font-size:' => array(
';',
'"',
"'")) as $begin_item => $end_item_array) {
735 $new_text_clean =
'';
737 while (($begin_pointer =
String::strpos($text_clean, $begin_item, $pointer)) !==
false) {
738 $end_pointer =
false;
739 foreach($end_item_array as $end_item) {
741 if (empty($end_pointer) || ($this_end_pointer < $end_pointer && $this_end_pointer > $begin_pointer)) {
742 $end_pointer = $this_end_pointer;
745 if ($end_pointer ===
false || $end_pointer < $begin_pointer) {
750 $item_value = str_replace(array(
'px',
'pt'), array(
''), trim($item_value));
751 if (
strpos($item_value,
'em') !==
false) {
752 $item_value = intval(16 * str_replace(array(
'em'), array(
''), $item_value));
754 if (is_numeric($item_value) && $item_value > 24 &&
String::substr($begin_item, 0, 4) ==
'font') {
756 }
elseif (is_numeric($item_value) && $item_value > $max_width) {
757 $item_value = $max_width;
758 }
elseif (is_numeric($item_value) && $item_value < 0) {
761 if ($item_value ==
'absolute') {
763 $item_value =
'relative';
765 $new_text_clean .=
String::substr($text_clean, $pointer, $begin_pointer - $pointer) . $begin_item . $item_value;
766 if (is_numeric($item_value) &&
substr($begin_item, -1) ==
':') {
767 $new_text_clean .=
'px';
769 $pointer = $end_pointer;
771 $text_clean = $new_text_clean .
String::substr($text_clean, $pointer, $text_end - $pointer);
774 $text_clean = str_replace(array(
' alt="alt"',
'td align="middle"',
'Verdana,;',
'</td><',
'</tr><',
'<br /><',
"\n\n\n\n",
"\n\n\n",
"\n\n",
"\r\n\r\n\r\n",
"\r\n\r\n",
"\r\n",
'font-size: xx-large',
'font size="9"',
'font size="8"',
'font size="7"',
' style=""',
' align=""'),
775 array(
' alt=""',
'td align="center"',
'Verdana;',
"</td>\n<",
"</tr>\n<",
"<br />\n<",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
'font-size: x-large',
'font size="6"',
'font size="6"',
'font size="6"',
'',
''), $text_clean);
793 public static function fopen_utf8(
$filename,
$mode, $force_filename_in_iso_8859 =
false, $try_filename_in_iso_8859_if_file_not_found =
true)
800 if(empty($file) && $try_filename_in_iso_8859_if_file_not_found){
807 $bom = fread($file, 3);
810 if ($bom !=
"\xEF\xBB\xBF") {
843 if(empty($file) && $try_filename_in_iso_8859_if_file_not_found){
848 $bom =
substr($file, 0, 3);
851 if ($bom ==
"\xEF\xBB\xBF") {
866 public static function feof($handle) {
868 if($handle ===
false) {
872 if(!isset($timeout)) {
873 $timeout = @ini_get(
'default_socket_timeout');
875 if(empty($timeout)) {
static strtoupper($string)
Returns string with all alphabetic characters converted to uppercase.
static strip_tags($string, $allowed_tags=null)
String::strip_tags()
static htmlentities($string, $flags=ENT_COMPAT, $charset=GENERAL_ENCODING, $suppr_endline=false, $encode_only_isolated_amperstands=false, $decode_html_entities_first=false)
Convert all applicable characters to HTML entities Cette fonction sert si on veut afficher du contenu...
static htmlspecialchars_decode($string, $style=ENT_COMPAT)
This function is String::htmlspecialchars_decode with php4 compatibility.
static utf8_encode($string)
Si vous avez des utilisateurs sous windows qui saisissent du contenu dans une interface qui l'insère ...
static convert_encoding($string, $new_encoding, $original_encoding=null)
Converts the character encoding of string $string to $new_encoding from optionally $original_encoding...
static textEncode($string, $suppr_endline=false, $encode_only_isolated_amperstands=false)
Méthode de compatibilité avec anciennes versions de PEEL utilisant textEncode au lieu de htmlentities...
static strpos($haystack, $needle, $offset=0)
Returns the numeric position of the first occurrence of needle in the haystack string.
static rawurldecode($string, $avoid_slash=false)
Returns rawurldecode.
static getCleanHTML($text, $max_width=null, $allow_form=false, $allow_object=false, $allow_class=false, $additional_config=null, $safe=true, $additional_elements=null, $max_caracters_length=50000, $max_octets_length=59000, $max_word_and_url_length=100)
Fonction qui nettoie le HTML.
static cut_with_separator($string, $max_part_length=40, $separator= ' ')
Adds a seperator every $max_part_length characters.
static fopen_utf8($filename, $mode, $force_filename_in_iso_8859=false, $try_filename_in_iso_8859_if_file_not_found=true)
Ouvre un fichier.
static html_entity_decode_if_needed($string)
String::html_entity_decode_if_needed()
static strtolower($string)
Returns string with all alphabetic characters converted to lowercase.
static file_get_contents_utf8($filename, $force_filename_in_iso_8859=false, $try_filename_in_iso_8859_if_file_not_found=true)
Renvoie le contenu d'un fichier.
static strlen($string)
Returns the length of the given string.
static feof($handle)
Tests for end-of-file on a file pointer In contrary of the default feof function, it returns true if ...
static str_shorten_words($string, $length_limit=100, $separator=" ", $force_shorten_if_special_content=false, $add_separator_instead_of_cutting=true)
On rajoute des espaces à l'intérieur des mots trop longs => à utiliser pour éviter de casser une mise...
static str_form_value($value, $flags=ENT_COMPAT)
Encode une chaine de caractères pour affichage dans un value="".
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
static detect_utf8_characters($string)
Détecte si au moins un caractère est manifestement de l'UTF8.
static str_htmlentities($string, $suppr_endline=false, $encode_only_isolated_amperstands=false)
Méthode de compatibilité avec anciennes versions de PEEL utilisant str_htmlentities au lieu de htmlen...
static strrpos($haystack, $needle, $offset=0)
Returns the numeric position of the last occurrence of needle in the haystack string.
static html_entity_decode($string, $quote_style=ENT_COMPAT, $charset=GENERAL_ENCODING)
String::html_entity_decode()
if(!defined('IN_PEEL')) $GLOBALS['ucfirsts']
static convert_accents($string, $convert_umlaut=false, $strip_umlaut=true)
convert_accents()
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.
static substr_count($string, $searched)
Returns the number of times the needle substring occurs in the haystack string.
static nl2br_if_needed($string)
Fonction de compatibilité avec de vieilles versions de PEEL ou du contenu qui vient d'ailleurs...
static str_shorten($string, $length_limit, $middle_separator= '', $ending_if_no_middle_separator= '...', $ideal_length_with_clean_cut_if_possible=null)
Raccourcit une chaine de caractère en insérant au milieu ou à la fin un séparateur.
static ucfirst($string)
Returns string with first letter uppercase.
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']
static rawurlencode($string, $avoid_slash=true)
Returns string compatible with Apache without the AllowEncodedSlashes directive ON => avoids systemat...