title: Program Find String Start End Geeks
signature: function programFindStringStartEndGeeks(str, corner) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(str, corner, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(str, corner),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver("geeksmanishgeeks", "geeks", true);
    console.log(`TEST-0...${result}`);
  
    result = driver("shreyadhatwalia", "abc", false);
    console.log(`TEST-1...${result}`);
  
    result = driver("10000100", "100", true);
    console.log(`TEST-2...${result}`);
  
    result = driver("abaa", "a", true);
    console.log(`TEST-3...${result}`);
  
    result = driver("30645530", "30", true);
    console.log(`TEST-4...${result}`);
  
    result = driver("0000011011001", "001", false);
    console.log(`TEST-5...${result}`);
  
    result = driver("dkqEd", "d", true);
    console.log(`TEST-6...${result}`);
  
    result = driver("48694119324654", "654", false);
    console.log(`TEST-7...${result}`);
  
    result = driver("1101010010", "11", false);
    console.log(`TEST-8...${result}`);
  
    result = driver("Ks", "KsFLmngGGOmHKs", false);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    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 );
  }