VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Returns the number of characters in a given string. It can be successfully used to evaluate the len

by J.L. (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 4th February 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Returns the number of characters in a given string. It can be successfully used to evaluate the length of a piece of text.

API Declarations


public count_final as double

Rate Returns the number of characters in a given string. It can be successfully used to evaluate the len



static count_text as double
for i = 1 to len(t.text)
select case mid(t.txe, i, 1)
case " ": count_text = count_text + 1
end select
next i
count_final = count_text + 1
msgbox "The total no. of characters in the given text are " & count_final
end sub

'to call the procedure

cmd1_click()  'cmd1 is the command button which is hit to get the length 
call str_manipulation(#name of textbox#)
end sub

Download this snippet    Add to My Saved Code

Returns the number of characters in a given string. It can be successfully used to evaluate the len Comments

No comments have been posted about Returns the number of characters in a given string. It can be successfully used to evaluate the len. Why not be the first to post a comment about Returns the number of characters in a given string. It can be successfully used to evaluate the len.

Post your comment

Subject:
Message:
0/1000 characters