Newbie question : string manipulation with VBscript. 
Author Message
 Newbie question : string manipulation with VBscript.

Hi,

I don't find any help to manipulate string with VBScript such as find a
substring , change one character at one position....

In my ASP project , I want limite the numbers of characters in an inputbox.
How to do ? because i didn't find any functions to cut a numbers of
characters. If someone succeed , i agree to receive some help.

Fabrice Meuwissen.
ADES nt.



Sat, 13 Jan 2001 03:00:00 GMT  
 Newbie question : string manipulation with VBscript.


Quote:

> I don't find any help to manipulate string with vbscript such as find a
> substring , change one character at one position....

VBScript allows many of the standard VB methods for strings, such as InStr,
Left, Right, Trim, etc. I recommend finding a good reference on the Net or
in a book for these. You could manipulate the string to limit it to the
first 10 characters like this:

strWhatever = Left(strWhatever, 10)

Quote:
> In my ASP project , I want limite the numbers of characters in an
inputbox.
> How to do ? because i didn't find any functions to cut a numbers of
> characters. If someone succeed , i agree to receive some help.

You should set the MAXLENGTH attribute for the input box to the desired
value (MAXLENGTH="10"). I think this is a better way to go than the Left
method, IMHO.

Good luck!

--
Tommy Higdon - Compaq Computer Corporation
NOTE: Opinions expressed are my own and
not necessarily those of Compaq.



Sat, 13 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help for a Newbie: CSV data to be used in string manipulation

2. Beginners date / string manipulation question...

3. easy string manipulation question

4. String Manipulation: Newby question

5. string manipulation question - easy one!

6. Some newbie string manipulation in basic/VB...

7. String manipulation with vbscript

8. string manipulation with VBScript

9. String Manipulation with VBScript

10. Simple VB 6.0 String Manipulation Question

11. Simple string manipulation question

12. newbie question on image manipulation

 

 
Powered by phpBB® Forum Software