Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 September 16th, 2003, 02:06 AM
Authorized User
 
Join Date: Sep 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default instr function

hi,

any function in C# that is equivalent to instr or instrRev?
Thx
 
Old September 18th, 2003, 01:54 AM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default

Hi,

You can use the IndexOf method of the String class. It returns the index (integer) of the first occurence of a substring, like so.

  String str = "teststring";
  Int32 i = str.IndexOf("string");

In this case, i will return a value of 4.

Cheers!


Marlon Villarama
Support Team
Web Burner Hosting
[email protected]
www.webburner.com
Toll-Free: 877-535-2876





Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle Instr ermutigen BOOK: SQL Functions Programmer's Reference 1 May 31st, 2009 12:04 AM
InStr Function - having problems mmcdonal VBScript 1 November 29th, 2004 02:50 PM
CHARINDEX instead of Instr... mircea Classic ASP Databases 7 July 19th, 2004 01:47 PM
help on functions instr.... kyootepuffy Classic ASP Basics 2 September 19th, 2003 10:01 AM
InStr() in Access 2000 fordrs3 Access VBA 1 July 8th, 2003 05:42 AM





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