Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slashes in a string

Status
Not open for further replies.

lavadan

Programmer
Dec 17, 2007
49
US
I have a string that can have N number of /. How can I find how many slashes my string has?

Apple/Banana/Peach -2 slashes
Cow/Milk - 1 slash
abc/xyz/per/wsl/pol -4 slashes

How can find the # of slashes?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top