You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Eng: The PHP string functions are part of the PHP core. No installation is required to use these functions.
4
+
* more on the link: https://www.w3schools.com/php/php_ref_string.asp
5
+
*
6
+
* Pt: As funções de string do PHP fazem parte do núcleo do PHP. Nenhuma instalação é necessária para usar essas funções.
7
+
* mais no link: https://www.w3schools.com/php/php_ref_string.asp
8
+
*/
9
+
10
+
$string = 'Eng: Hello World !!! || Pt: Ola Mundo !!!';
11
+
12
+
//Eng: get the length of a string || Pt: obter o comprimento de uma string
13
+
echostrlen($string);
14
+
echo'<br>';
15
+
16
+
17
+
//Eng: find the pasition of the first occurence of a substring in a string || Pt: encontre a passagem da primeira ocorrência de uma substring em uma string
18
+
echostrpos($string, 'o');
19
+
echo'<br>';
20
+
21
+
//Eng: find the positon of the last occurence of a substring in a string || Pt: encontre a posição da última ocorrência de uma substring em uma string
22
+
echostrrpos($string, 'o');
23
+
echo'<br>';
24
+
25
+
//Eng: Reverse a string || Pt: Inverter uma string
26
+
echostrrev($string);
27
+
echo'<br>';
28
+
29
+
//Eng: covert all characters to lowercase || Pt: converter todos os caracteres para minúsculos
30
+
echostrtolower($string);
31
+
echo'<br>';
32
+
33
+
//Eng: covert all characters to uppercase || Pt: converta todos os caracteres para maiúsculos
34
+
echostrtoupper($string);
35
+
echo'<br>';
36
+
37
+
//Eng: uppercase the first character of each word || Pt: maiúsculo o primeiro caractere de cada palavra
38
+
echoucwords($string);
39
+
echo'<br>';
40
+
41
+
42
+
//Eng: uppercase the first character of each word
43
+
echostr_replace('World', 'Everyone', $string);
44
+
echo'<br>';
45
+
46
+
47
+
48
+
/* more on the link: https://www.w3schools.com/php/php_ref_string.asp
0 commit comments