Welcome to the Monastery | |
PerlMonks |
Re: Source Divers: string delimitersby Abigail-II (Bishop) |
on Jul 25, 2002 at 09:45 UTC ( [id://185153]=note: print w/replies, xml ) | Need Help?? |
strchr locates the first occurance of the second
argument (a character) in its first argument (a string). It's
returned as a pointer. So, if term = '[' it returns
a pointer to the [ in "([{< )]}> )]}>".
5 characters later in the string, you find the closing delimiter.
The sequence )]}> is repeated because they are valid
opening delimiters as well.
Here's a followup question: why does the string have spaces in it? Abigail
In Section
Meditations
|
|