Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

strchr() i strrchr() - bug?

[es] :: PHP :: strchr() i strrchr() - bug?

[ Pregleda: 3142 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

karas

Član broj: 5574
Poruke: 482
*.adsl.sezampro.yu.



+1 Profil

icon strchr() i strrchr() - bug?14.10.2005. u 10:02 - pre 225 meseci
Dakle, ponashanje obe funkcije je isto:

Code:

echo strchr("hello world", "w");

i
Code:

echo strrchr("hello world", "w");


ispisuje world. Je l' to normalno?

Sveti Avgustin: "Dobar hrišćanin treba da se kloni matematičara i svih onih koji daju lažna proročanstva. Postoji opasnost da su matematičari već sklopili pakt sa Đavolom, da pomrače čovekov um i da ga okuju okovima pakla."
 
Odgovor na temu

noviKorisnik
Dejan Katašić
Novi Sad

Član broj: 13216
Poruke: 4533
*.dialup.neobee.net.

Sajt: www.novikorisnik.net


+5 Profil

icon Re: strchr() i strrchr() - bug?14.10.2005. u 10:22 - pre 225 meseci
Jeste. Pogledaj opise:

string strstr ( string haystack, string needle )
Citat:
Returns part of haystack string from the first occurrence of needle to the end of haystack.

string strrchr ( string haystack, string needle )
Citat:
This function returns the portion of haystack which starts at the last occurrence of needle and goes until the end of haystack.

U primeru imaš samo jedno "w" koje je ujedno i prva i poslednja pojava.
 
Odgovor na temu

[es] :: PHP :: strchr() i strrchr() - bug?

[ Pregleda: 3142 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.