Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Easy question please Help

Status
Not open for further replies.

Knexo10

IS-IT--Management
Joined
Feb 12, 2002
Messages
20
Location
AU
What is the quickest easiest way to turn the string "somepicture.jpg" into the string "somepicture" with lingo.
So for any string of a file name removes the extension and the "."

Thanks
 
Heres how to hack off the last four Characters from a string:
----
mystring = "somepicture.jpg"
mystring = mystring.char[1..mystring.length - 4]
----

mystring is the string. All it does is set mystring to itself minus the last 4 characters. Have fun.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top