Documentation Center

PassoloApp.GetSourceTextCounts

Counts Words, letters and characters in the source text of this string. The count results are stored in the returned PslStringCounter object.

Syntax

Expression.Get SourceTextCounts() as PslStringCounter

Expression Required. Object of type PslTransString

Example

Sub CompareWordCount(t As PslTransString)
  Dim srccount As PslStringCounter
  Set srccount = t.GetSourceTextCounts()

  Dim trncount As PslStringCounter
  Set trncount = t.GetTextCounts()

  Dim diff As Integer
  diff = trncount.WordCount - srccount.WordCount

  PSL.Output "Change in word count: " & CStr(diff)
End Sub