Thursday, November 29, 2018

Simple Program to get the character count in a string using VBScript

=>here is the Simple Program to get the character count in a string using VBScript.

program:

Str="uzumaki naruto"

MsgBox len(Str) - len(replace(Str, "a", ""))

'Note: simply replace the "uzumaki naruto" with your string in quotes and "a" value with the character you want. it will work.

program of a pass by reference vs. pass by value in VBScript.

=>here is the program of a pass by reference vs. pass by value in VBScript.

program:

Dim a,b
a=10
b=20
Function fun(ByVal x,ByRef y)
x=100
y=200
End Function
Call fun(a,b)
Msgbox a&" "&b