title: String Containing First Letter Every Word Given String Spaces
signature: stringContainingFirstLetterEveryWordGivenStringSpaces(str) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(String actual, String expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(str, String expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(str), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          "t a", 
          "ta")
      }");
  
      print("TEST-1...${driver(
          "77 78 2 600 7", 
          "77267")
      }");
  
      print("TEST-2...${driver(
          "011 10 10", 
          "011")
      }");
  
      print("TEST-3...${driver(
          "kV Co O iR", 
          "kCOi")
      }");
  
      print("TEST-4...${driver(
          "2", 
          "2")
      }");
  
      print("TEST-5...${driver(
          "0 11", 
          "01")
      }");
  
      print("TEST-6...${driver(
          "Y sT wgheC", 
          "Ysw")
      }");
  
      print("TEST-7...${driver(
          "58 824 6", 
          "586")
      }");
  
      print("TEST-8...${driver(
          "00 100 001 0111", 
          "0100")
      }");
  
      print("TEST-9...${driver(
          "Q", 
          "Q")
      }");
  
      return 0;
  }
source_py: def string_containing_first_letter_every_word_given_string_spaces(str):
      result = ''
      v = True
      for i in range(len(str)):
          if (str[i] == ' '):
              v = True
          elif ((str[i] != ' ') and (v == True)):
              result += str[i]
              v = False
      return result
source_cpp: string string_containing_first_letter_every_word_given_string_spaces(string str) {
    string result = "";
    bool v = true;
    for ( int i = 0;
    i < str . length ( );
    i ++ ) {
      if ( str [ i ] == ' ' ) v = true;
      else if ( str [ i ] != ' ' && v == true ) {
        result . push_back ( str [ i ] );
        v = false;
      }
    }
    return result;
  }