Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 23rd, 2007, 04:09 PM
Registered User
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default String functions in classic asp

I need help doing some string functions in class asp - I retreive a string from db - then I need to either crap the last 12 characters or replace the characters before the last 12 - whichever - I would like to know what string functions are available.

Thank you for all the help forum people.

Old May 23rd, 2007, 08:10 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons


Something like this would work.

Dim sString
sString = "Some Really long string that you need to remove 12 chars from"

Dim sNewString
Dim iLength
iLength = Len(sString)

sNewString = Left(sString, (CInt(iLength) - 12))

What this does is, it gets the total length of the string (Len()) and then we use left to move the total length of the string minus 12.


================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
================================================== =========
Why can't Programmers, program??
================================================== =========

Similar Threads
Thread Thread Starter Forum Replies Last Post
string to x-path - EXSLT - dynamic functions Geierwally XSLT 1 July 12th, 2007 10:35 AM
convert string to Uppercase in Classic asp MyronCope Classic ASP Basics 1 November 16th, 2006 04:12 PM
String functions..... BlueStag VB.NET 2002/2003 Basics 1 June 10th, 2005 05:58 AM
XPath: String functions question. pupu79 XSLT 4 January 10th, 2005 03:00 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.