Skip to content

Planet-Source-Code/hendry-cahyadi-counting-number-of-words-in-a-string__4-6846

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Counting number of words in a string

Description

This is a simple and easy way for counting the number of words in a string.

More Info

Submitted On
By Hendry Cahyadi
Level Beginner
User Rating 3.5 (14 globes from 4 users)
Compatibility ASP (Active Server Pages)
Category Strings
World ASP / VbScript
Archive File

Source Code

dim TheString, ArrayTemp, NumberOfWords, Word
TheString = "Hello, How are you today?" 'just a test string
ArrayTemp = split(TheString, " ")
NumberOfWords = UBound(ArrayTemp) + 1
Response.Write "<P>The string is: " & TheString
Response.Write "<P>Number of words in that string: " & NumberOfWords
Response.Write "<P>Here are the words which compose that string: "
for each Word in ArrayTemp
 Response.Write "<BR>" & word
next

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published