Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: replace '\'
PostPosted: July 16th, 2010, 11:22 am 
Offline

Joined: December 14th, 2004, 5:08 pm
Posts: 55
Location: Holland
Opus: version 8.0
OS: XP, Vista, Windows7, Windows8
System: Intel Corei7-2600 CPU 3.400GHz
I remember that I had post this some years ago (thought that Robin Garret answerred it) I can't find it anymore, does anyone has a clou to fix this....

SYSTEM_PUBLICATION_DIR contains in the last characters a '\' or '\\'. So when exporting to text this variable it will write C:\version2\
I want to replace the last slash '\' with nothing so it write C:\version2


Thanks
Jim Opus7.03

Found it....thank you....


Top
 Profile  
 
 Post subject: Re: replace '\'
PostPosted: July 16th, 2010, 12:24 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
For everyone who hasn't found it....


To shorten a string or an array use length-x like such;

Code:
var p = SYSTEM_PUBLICATION_DIR

p = p.substring(0,p.length-1)


Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 48 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group