title: Program Find String Start End Geeks
signature: function programFindStringStartEndGeeks($str, $corner) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($str, $corner, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($str, $corner), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        "geeksmanishgeeks", "geeks", 
        true));
      
      printf("TEST-1...%s\n",driver(
        "shreyadhatwalia", "abc", 
        false));
      
      printf("TEST-2...%s\n",driver(
        "10000100", "100", 
        true));
      
      printf("TEST-3...%s\n",driver(
        "abaa", "a", 
        true));
      
      printf("TEST-4...%s\n",driver(
        "30645530", "30", 
        true));
      
      printf("TEST-5...%s\n",driver(
        "0000011011001", "001", 
        false));
      
      printf("TEST-6...%s\n",driver(
        "dkqEd", "d", 
        true));
      
      printf("TEST-7...%s\n",driver(
        "48694119324654", "654", 
        false));
      
      printf("TEST-8...%s\n",driver(
        "1101010010", "11", 
        false));
      
      printf("TEST-9...%s\n",driver(
        "Ks", "KsFLmngGGOmHKs", 
        false));
      
  }
  
  main();
  ?>
source_py: def program_find_string_start_end_geeks(str, corner):
      n = len(str)
      cl = len(corner)
      if (n < cl):
          return False
      return ((str[:cl] == corner) and (str[(n - cl):] == corner))
source_cpp: bool program_find_string_start_end_geeks(string str, string corner) {
    int n = str . length ( );
    int cl = corner . length ( );
    if ( n < cl ) return false;
    return ( str . substr ( 0, cl ) . compare ( corner ) == 0 && str . substr ( n - cl, cl ) . compare ( corner ) == 0 );
  }