George Patterson wrote:

On Mon, 2006-01-09 at 20:25 -0500, Ampere K. Hardraade wrote:
On January 9, 2006 04:19 pm, Curtis L. Olson wrote:
In nasal, I would like to check if a string ends in '.wav'.  Is there an
easy way to do this?

Thanks,

Curt.
You can try this:

substr(foo, size(foo) - 5) == ".wav"

Ampere

Ampere, should that be substr(foo, size(foo) - 4) == ".wav" as - 5 will compare the last five
characters in the string?

Anyway, I'm sure that it is just a typo but bound to confuse someone
reading email or the archive.

Yup, just confirming that you want to compare "4", not "5", but thanks for the tip Ampere, huge help!

Curt.

--
Curtis Olson        http://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:        2f585eeea02e2c79d7b1d8c4963bae2d



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to