title: String Containing First Letter Every Word Given String Spaces
signature: pub fn string_containing_first_letter_every_word_given_string_spaces(str: String) -> String {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: String, expected: String)->bool{
  return actual==expected
  }
  pub fn driver(str: String, expected: String)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(str), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "t a".to_string(), 
        "ta".to_string()
      ));
      
      println!("TEST-1...{}", driver(
        "77 78 2 600 7".to_string(), 
        "77267".to_string()
      ));
      
      println!("TEST-2...{}", driver(
        "011 10 10".to_string(), 
        "011".to_string()
      ));
      
      println!("TEST-3...{}", driver(
        "kV Co O iR".to_string(), 
        "kCOi".to_string()
      ));
      
      println!("TEST-4...{}", driver(
        "2".to_string(), 
        "2".to_string()
      ));
      
      println!("TEST-5...{}", driver(
        "0 11".to_string(), 
        "01".to_string()
      ));
      
      println!("TEST-6...{}", driver(
        "Y sT wgheC".to_string(), 
        "Ysw".to_string()
      ));
      
      println!("TEST-7...{}", driver(
        "58 824 6".to_string(), 
        "586".to_string()
      ));
      
      println!("TEST-8...{}", driver(
        "00 100 001 0111".to_string(), 
        "0100".to_string()
      ));
      
      println!("TEST-9...{}", driver(
        "Q".to_string(), 
        "Q".to_string()
      ));
      
  }
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;
  }