title: String Containing First Letter Every Word Given String Spaces
signature: func stringContainingFirstLetterEveryWordGivenStringSpaces(str string) string {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual string, expected string) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(str string, expected string) string {
      if validateSolution(PLACEHOLDER_FN_NAME(str),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver("t a", "ta")
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver("77 78 2 600 7", "77267")
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver("011 10 10", "011")
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver("kV Co O iR", "kCOi")
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver("2", "2")
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver("0 11", "01")
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver("Y sT wgheC", "Ysw")
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver("58 824 6", "586")
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver("00 100 001 0111", "0100")
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver("Q", "Q")
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }