title: Number Substrings String
signature: numberSubstringsString :: String -> Integer
  numberSubstringsString str = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: String -> Integer -> String
  driver str expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME str) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver ("gZFGZsHCimLf") (78) )
  
      printf "TEST-1...%s\n" (driver ("505357") (21) )
  
      printf "TEST-2...%s\n" (driver ("011011101") (45) )
  
      printf "TEST-3...%s\n" (driver ("ovfwP Osauz") (66) )
  
      printf "TEST-4...%s\n" (driver ("92132238746026") (105) )
  
      printf "TEST-5...%s\n" (driver ("01100") (15) )
  
      printf "TEST-6...%s\n" (driver ("RaOWYQRfiWKSyC") (105) )
  
      printf "TEST-7...%s\n" (driver ("861330202") (45) )
  
      printf "TEST-8...%s\n" (driver ("001100010") (45) )
  
      printf "TEST-9...%s\n" (driver ("uvpKlGUBLOMba") (91) )
  
source_py: def number_substrings_string(str):
      n = len(str)
      return int(((n * (n + 1)) / 2))
source_cpp: int number_substrings_string(string str) {
    int n = str . length ( );
    return n * ( n + 1 ) / 2;
  }