title: Program Find String Start End Geeks
signature: program_find_string_start_end_geeks <- function(str, corner) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(str, corner, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(str, corner), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "geeksmanishgeeks", "geeks", 
          TRUE
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "shreyadhatwalia", "abc", 
          FALSE
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "10000100", "100", 
          TRUE
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "abaa", "a", 
          TRUE
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "30645530", "30", 
          TRUE
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "0000011011001", "001", 
          FALSE
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "dkqEd", "d", 
          TRUE
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "48694119324654", "654", 
          FALSE
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "1101010010", "11", 
          FALSE
      )))
  
      cat(sprintf("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 );
  }