Tuesday, 20 February 2018

php - Determining if string ends with another string

How do one determine,if the strings appears at the end of the other string. If they do then print true to standard out and false if they don’t. Would strpos will help?



    Sample Input

S1: “staff”
S2: “FF”


how would i make a function to run this,




  function matching_ends($s1,$s2){

}

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...