Print Page | Close Window

String breaking, pls hep

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13036
Printed Date: 29 March 2026 at 2:08am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: String breaking, pls hep
Posted By: PrivateEye
Subject: String breaking, pls hep
Date Posted: 18 December 2004 at 3:14pm
I am using BarCode Slot Reader with VB 6. A carriage return character is added in the with the string I get from the port. I want to drop this character to have the rest of the string. I don't know how to use Mid, Repllace etc functions. If anyone know pls help me.

-------------
The Judgement Day



Replies:
Posted By: dj air
Date Posted: 18 December 2004 at 3:30pm
Value = Trim(Mid(vlauetriming,start number, maxium number))

Value = Trim(Mid(value,1,20))

that will get the value for the first 20 charecters




Posted By: Gullanian
Date Posted: 18 December 2004 at 4:21pm
You could also use left()

Value = left(string,20)

Would take 20 characters, or to take all but the one on the right:

Value = left(string,len(string) - 1)


Posted By: Mart
Date Posted: 18 December 2004 at 4:52pm
If you just use RTrim(string) it will knock crlf's off



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net