title: Program Find String Start End Geeks
signature: function program_find_string_start_end_geeks(str, corner)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(str, corner, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(str, corner), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver("geeksmanishgeeks", "geeks", true);
      @printf("TEST-0...%s\n",result);
      
      result = driver("shreyadhatwalia", "abc", false);
      @printf("TEST-1...%s\n",result);
      
      result = driver("10000100", "100", true);
      @printf("TEST-2...%s\n",result);
      
      result = driver("abaa", "a", true);
      @printf("TEST-3...%s\n",result);
      
      result = driver("30645530", "30", true);
      @printf("TEST-4...%s\n",result);
      
      result = driver("0000011011001", "001", false);
      @printf("TEST-5...%s\n",result);
      
      result = driver("dkqEd", "d", true);
      @printf("TEST-6...%s\n",result);
      
      result = driver("48694119324654", "654", false);
      @printf("TEST-7...%s\n",result);
      
      result = driver("1101010010", "11", false);
      @printf("TEST-8...%s\n",result);
      
      result = driver("Ks", "KsFLmngGGOmHKs", false);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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 );
  }