Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM ASP InStr

date posted 12th December 2001 15:38

what are you reying to do? check if the substring is there or extract it?

in jscript:

strTest="hairy old bollocks";
strFind="old"

strPosition=strTest.indexOf(strFind) //returns -1 if string not present,
position otherwise

if (strPosition>-1){
strNewString=strTest.substr(strPosition, strFind.length-1);
//javascript1.2, IIS4+
strNewString2=strTest.substring(strPosition, strPosition+3);
//javascript1.0. (and i think IIS3+) - first value included in substring,
final one isnt
/* strFind will return length of strFind, you knock 1 off since arrays
start at 0, so 'o'=0, 'l'=1, 'd'=2.
*/

}

so to check if the substring is present make sure the return is greater
than -1, to get the substring get its index and its length and use substr.
----- Original Message -----
From: "technoir" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Wednesday, December 12, 2001 2:44 PM
Subject: FN-FORUM ASP InStr


> any ideas why InStr wont work using JScript ?
>
>
> ============================================================
>
> * Free listing for freelancers
> * Free to advertise jobs
> * Free jobs distribution service
> * Free database of 5000 freelancers
>
> Freelancers and Freelance Jobs:
> http://www.freelancers.net
>
> Forum FAQs:
> http://freelancers.netrickery.com
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]



Messages by Day
December 31st 2001
December 30th 2001
December 29th 2001
December 28th 2001
December 27th 2001
December 26th 2001
December 25th 2001
December 24th 2001
December 23rd 2001
December 22nd 2001
December 21st 2001
December 20th 2001
December 19th 2001
December 18th 2001
December 17th 2001
December 16th 2001
December 15th 2001
December 14th 2001
December 13th 2001
December 12th 2001
December 11th 2001
December 10th 2001
December 9th 2001
December 8th 2001
December 7th 2001
December 6th 2001
December 5th 2001
December 4th 2001
December 3rd 2001
December 2nd 2001
December 1st 2001


Messages by Month
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000