How would I strip a filename (in a string) of its extention.

eg
filestr="Textfile.txt"

I want filestr to = "Textfile"

Thanks

Garrett