Timeline for Determine if Strings are equal
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot | Commonmark migration | |
| Mar 18, 2014 at 0:49 | comment | added | Jack | I suppose you could use anchors instead, but more importantly it would require preg_quote() as well :) | |
| Mar 17, 2014 at 18:29 | comment | added | dkasipovic | True, how about this then, it limits replace to one !strlen(preg_replace("/{$a}/", '', $b, 1)); and is 45 characters? | |
| Mar 17, 2014 at 16:10 | comment | added | Jack | @D.Kasipovic Interesting, but I think it fails for $a == 'foo' and $b = 'foofoo' :) | |
| Mar 17, 2014 at 14:40 | comment | added | dkasipovic | Couldn't something like this work: !strlen(str_replace($a,'',$b)); It should return 1 if two strings are equal? | |
| S Mar 13, 2014 at 11:02 | review | Low quality posts | |||
| Mar 13, 2014 at 11:07 | |||||
| S Mar 13, 2014 at 11:02 | review | First posts | |||
| Mar 13, 2014 at 11:07 | |||||
| Mar 13, 2014 at 10:45 | history | answered | Jack | CC BY-SA 3.0 |