title: Program Find String Start End Geeks
signature: func programFindStringStartEndGeeks(str string, corner string) bool {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual bool, expected bool) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(str string, corner string, expected bool) string {
      if validateSolution(PLACEHOLDER_FN_NAME(str, corner),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver("geeksmanishgeeks", 
  	"geeks", true)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver("shreyadhatwalia", 
  	"abc", false)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver("10000100", 
  	"100", true)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver("abaa", 
  	"a", true)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver("30645530", 
  	"30", true)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver("0000011011001", 
  	"001", false)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver("dkqEd", 
  	"d", true)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver("48694119324654", 
  	"654", false)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver("1101010010", 
  	"11", false)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver("Ks", 
  	"KsFLmngGGOmHKs", false)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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 );
  }