@ 2017-07-11T10:18:01Z <?php
function toUpperCamelCase(string $text): string
{
$replacement = "";
$text = delete_all_between('(', ')', $text);
$text = preg_replace("/(\b(de|du|la|le|et)\b)|(\b((l|d)[',’]))/i", ' ', $text);
var_dump($text)
// $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
// $text = ucwords($text);
// $text = preg_replace('~[^\pL\d]+~u', $replacement, $text);
// $text = trim($text, $replacement);
// $text = preg_replace('~-+~', $replacement, $text);
return $text;
}
function delete_all_between(string $beginning, string $end, string $string): string
{
$beginningPos = strpos($string, $beginning);
$endPos = strpos($string, $end);
if ($beginningPos === false || $endPos === false) {
return $string;
}
$textToDelete = substr($string, $beginningPos, ($endPos + strlen($end)) - $beginningPos);
return str_replace($textToDelete, '', $string);
}
echo toUpperCamelCase("Identifiant de l’organisme destinataire de la déclaration néant");
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.1.7 0.007 0.010 17.04 7.1.6 0.020 0.010 35.09 7.1.5 0.035 0.009 34.72 7.1.4 0.030 0.016 34.19 7.1.3 0.019 0.018 34.27 7.1.2 0.029 0.017 34.35 7.1.1 0.003 0.017 16.40 7.1.0 0.014 0.011 16.33 7.0.20 0.011 0.004 16.48 7.0.19 0.008 0.011 16.34 7.0.18 0.018 0.005 16.15 7.0.17 0.009 0.015 15.96 7.0.16 0.011 0.011 16.11 7.0.15 0.011 0.010 16.13 7.0.14 0.007 0.010 16.11 7.0.13 0.010 0.009 16.23 7.0.12 0.013 0.016 16.32 7.0.11 0.007 0.016 16.05 7.0.10 0.015 0.007 16.01 7.0.9 0.006 0.015 16.15 7.0.8 0.007 0.012 15.93 7.0.7 0.012 0.006 16.02 7.0.6 0.011 0.010 15.73 7.0.5 0.007 0.013 16.10 7.0.4 0.007 0.011 16.27 7.0.3 0.000 0.014 16.09 7.0.2 0.006 0.011 16.16 7.0.1 0.007 0.013 16.14 7.0.0 0.010 0.010 16.24
preferences:dark mode live preview
140.66 ms | 1394 KiB | 7 Q