Documentation Center

PslStringCounter.CharCount

Contains the number for characters including white-spaces and punctuation characters.

Syntax

Expression.CharCount as Long

Expression Required. Object of type PslStringCounter

Example

Sub main
  Dim test As String
  test = "This is a test!!!"

  Dim counter As PslStringCounter
  Set counter = PSL.GetTextCounts(test)
  PSL.Output "Counting """ & test & """:"
  PSL.Output "StringCount = " & counter.StringCount
  PSL.Output "WordCount = " & counter.WordCount
  PSL.Output "LetterCount = " & counter.LetterCount
  PSL.Output "CharCount = " & counter.CharCount
End Sub

Counting "This is a test!!!"

StringCount = 1

WordCount = 4

LetterCount = 11

CharCount = 17