title: Program Find String Start End Geeks
signature: class Solution {
  
      public Boolean programFindStringStartEndGeeks(String str, String corner) {
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 );
  }
question_info.extension: java
question_info.entry_fn_name: programFindStringStartEndGeeks
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"str": "geeksmanishgeeks", "corner": "geeks"}}, {"idx": 1, "outputs": false, "inputs": {"str": "shreyadhatwalia", "corner": "abc"}}, {"idx": 2, "outputs": true, "inputs": {"str": "10000100", "corner": "100"}}, {"idx": 3, "outputs": true, "inputs": {"str": "abaa", "corner": "a"}}, {"idx": 4, "outputs": true, "inputs": {"str": "30645530", "corner": "30"}}, {"idx": 5, "outputs": false, "inputs": {"str": "0000011011001", "corner": "001"}}, {"idx": 6, "outputs": true, "inputs": {"str": "dkqEd", "corner": "d"}}, {"idx": 7, "outputs": false, "inputs": {"str": "48694119324654", "corner": "654"}}, {"idx": 8, "outputs": false, "inputs": {"str": "1101010010", "corner": "11"}}, {"idx": 9, "outputs": false, "inputs": {"str": "Ks", "corner": "KsFLmngGGOmHKs"}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(String str, String corner, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(str, corner,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution("geeksmanishgeeks", "geeks", true);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("shreyadhatwalia", "abc", false);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("10000100", "100", true);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("abaa", "a", true);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("30645530", "30", true);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("0000011011001", "001", false);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("dkqEd", "d", true);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("48694119324654", "654", false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("1101010010", "11", false);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("Ks", "KsFLmngGGOmHKs", false);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String str, String corner, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(str, corner),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__