title: Number Substrings String
signature: number_substrings_string <- function(str) {
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;
  }