NameSilo

Count

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

DSL

Established Member
Impact
6
How would I count occurances of a character? Say like games-domains-coms.com

What function would I use to count the occurance of -?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
In what language are you talking about? You can use strlen in PHP or length in Perl.

Oh I read your post wrong I think. You're wanting to count how many times a certain character occurs in a string right? You can use substr_count in PHP and the tr/// function in perl for that.
 
Last edited:
0
Close
thanks.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back