Print Page | Close Window

Croping Variables

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=10878
Printed Date: 31 March 2026 at 1:36am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Croping Variables
Posted By: neotrix
Subject: Croping Variables
Date Posted: 15 June 2004 at 12:57pm

Hello, i read a variable from some source,

like suppse, SongList(3)=About Chiniot.About

I wanted to Write the part before the "." and after the "." seperatly,

i tried

Left(SongList(i), InStrRev(SongList(i), ".") - 1)

Works flowlessly... but when i tried writing the right part

Right(SongList(i), InStrRev(SongList(i), ".") - 1)

It gets crazy

like here is what i got when i try priting from right...

Originally posted by MyCrazyResult MyCrazyResult wrote:

Variable Value: Home.Home Output:.Home
Variable Value: About Chiniot.About Output: Chiniot.About
Variable Value: About Moeez.Moeez Output: Moeez.Moeez
Variable Value: Photos From Chiniot.Photos Output: From Chiniot.Photos
Variable Value: Historic Background.History Output:c Background.History
Variable Value: Site Creadits.Creadits Output:adits.Creadits

what's happening



-------------
http://www.muhammadbinyusrat.com/blog/" rel="nofollow - Say to the believing men..



Replies:
Posted By: Mart
Date Posted: 15 June 2004 at 1:18pm

Try

Split(SongList(i), ".")(0)



Posted By: neotrix
Date Posted: 15 June 2004 at 11:43pm
Yup! That works, thanku very much mart

-------------
http://www.muhammadbinyusrat.com/blog/" rel="nofollow - Say to the believing men..


Posted By: pmormr
Date Posted: 17 June 2004 at 9:41pm
for future refrence... a quick search of google for working with strings in asp will bring up over a million pages with a bunch of functions and how to use them on it

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: neotrix
Date Posted: 19 June 2004 at 11:51pm

Originally posted by pmormr pmormr wrote:

for future refrence... a quick search of google for working with strings in asp will bring up over a million pages with a bunch of functions and how to use them on it

Actually pmormr, i always goto google before comming here, but the problem is, that i dont understand what to write in the seachbox, because i have no clue.. like suppose i want to make two parts of a varuable blablabla.blablabla, what shud i write ? now i know i can use Split, but at that time ? i had no clue, so i had to come to the forum to ask the question, and i feel others may also find it usefull ? if some of them dont know asp very well



-------------
http://www.muhammadbinyusrat.com/blog/" rel="nofollow - Say to the believing men..


Posted By: pmormr
Date Posted: 20 June 2004 at 12:06am

asp's too extensive of a language to know it all... there's got to be like 250 different functions for just strings



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



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