Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Trimming strings

Trimming strings

2004-04-02       - By Dan Yargici

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Use 'Split' and take the first object in your array.

MyString = "Iguessitstimetosplit.tga"
MyArray = Split(MyString, ".", -1, 1)
CleanFilename = MyArray(0)

Returns "Iguessitstimetosplit"

I guess it's almost the same for Jscript.

DAN

-- -- Original Message -- --
From: "Bernard Lebel" <atyss4si@(protected)>
To: <XSI@(protected)>
Sent: Friday, April 02, 2004 6:45 PM
Subject: [Script] Trimming strings


> Hello,
>
> Is there are way to trim an string? For instance, I'm getting a file name. I
> would like to compare this name with other file names, but without the
> padding and extension (basically to check if there are sequences of
> different name in the same folder). The problem is that when you get the
> file name of a file through FileSystemObject, you get the padding and
> extensions as well.
>
> Thanks for any info
> Bernard
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in body:
> unsubscribe xsi
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Use 'Split' and&nbsp;take the first object in your
array.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>MyString =
"Iguessitstimetosplit.tga"</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>MyArray = Split(MyString, ".", -1,
1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>CleanFilename =
MyArray(0)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Returns "Iguessitstimetosplit"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I guess it's almost the same for
Jscript.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>DAN</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-- -- Original Message -- -- </FONT>
<DIV><FONT face=Arial size=2>From: "Bernard Lebel" &lt;</FONT><A
href="mailto:atyss4si@(protected)"><FONT face=Arial
size=2>atyss4si@(protected)</FONT></A><FONT face=Arial size=2>&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>To: &lt;</FONT><A
href="mailto:XSI@(protected)"><FONT face=Arial
size=2>XSI@(protected)</FONT></A><FONT face=Arial size=2>&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>Sent: Friday, April 02, 2004 6:45 PM</FONT></DIV>
<DIV><FONT face=Arial size=2>Subject: [Script] Trimming
strings</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT face=Arial
size=2>&gt; Hello,<BR>&gt; <BR>&gt; Is there are way to trim an string? For
instance, I'm getting a file name. I<BR>&gt; would like to compare this name
with other file names, but without the<BR>&gt; padding and extension (basically
to check if there are sequences of<BR>&gt; different name in the same folder).
The problem is that when you get the<BR>&gt; file name of a file through
FileSystemObject, you get the padding and<BR>&gt; extensions as well.<BR>&gt;
<BR>&gt; Thanks for any info<BR>&gt; Bernard<BR>&gt; ---<BR>&gt; Unsubscribe?
Mail </FONT><A href="mailto:Majordomo@(protected)"><FONT face=Arial
size=2>Majordomo@(protected)</FONT></A><FONT face=Arial size=2> with the
following text in body:<BR>&gt; unsubscribe xsi<BR>&gt; </FONT></BODY></HTML>