Advertisement
C_Volume2 Coding Standards #78479

Count spaces or occurances of words or anything with one simple line of code

Count spaces or occurances of words or anything with one simple line of code.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Ubound(Split(text1.text,"hi"))

this can easily be transformed into a function
Public Function fCount(ByVal sString As String, ByVal sDelim As String) As Long
  
  fCount = 0
  On Error Resume Next
  fCount = UBound(Split(sString, sDelim))
End Function
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine