-1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> text4 </title>
</head>
<body>
<?php
/**
* Converte uma palavra no plural para o singular
* @param string $str Uma palavra
* @return string Palavra no singular
*/
function pluraltosingular($str) {
if (substr($str, -1) != 's')
return $str;
// albuns batons marrons
if (substr($str, -2, 1) == 'n')
return substr($str, 0, -2) . 'm';
// flores gizes vezes tenis
else if (strpos('aeou', substr($str, 0, 1)) === false && substr($str, -2, 1) == 'e' && strpos('nrsz', substr($str, -3, 1)) !== false)
return substr($str, 0, -2);
// aneis anzois jornais
else if (substr($str, -2) == 'is' && strpos('aeiou', substr($str, -3, 1)) !== false)
return substr($str, 0, -2) . 'l';
// frances portugues
else if (substr($str, -2) == 'es' && strpos('clu', substr($str, -3, 1)) !== false)
return $str;
// caes paes
else if (substr($str, -3) == 'aes')
return substr($str, 0, -2) . 'o';
// leoes
else if (substr($str, -3) == 'oes')
return substr($str, 0, -3) . 'ao';
// exceto onibus lapis tenis arvores
else if (strpos('ius', substr($str, -2, 1)) === false && substr($str, -3, 1) != 'n')
return substr($str, 0, -1);
return $str;
}
?>
</body>
</html>
I believe you have nothing ready in Javascript to generate
Sha1
, unless it is a library. What is the need? Give more details in your question.– Wallace Maxters
actually had put the wrong code but I’ve already edited thanks is this is now correct.
– leotec
I believe the intention is not to do the work for you, I suggest you try to do and upon your doubts it will be better to help you.
– Dagobe
I’m trying to do more with doubts I’m learning if I have a help how to do I don’t want you to do for me
– leotec