Forum Moderators: coopster & phranque

Message Too Old, No Replies

Character index in string

         

Reynolds

3:12 pm on Jun 28, 2002 (gmt 0)

10+ Year Member



Hello,

This should be easy.

How do I determine what the character index of a certain character is in a string?

Example.
Consider this email address
foo@bar.com

How do I determine that the @ symbol is at index 3?

Thanks

Eric

DrDoc

4:23 pm on Jun 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First of all, which programming/scripting language is the question about? ;)

Reynolds

4:31 pm on Jun 28, 2002 (gmt 0)

10+ Year Member



Perl, I got it.

index (scalar, string)

Thanks

DrDoc

4:53 pm on Jun 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, that's the one ;)
Well, glad you found the answer ..