Re: String.IndexOf
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 08/03/04
- Next message: Nick Carter: "AssemblyBuilder, al.exe and the /embed switch"
- Previous message: BobTheHacker: "RE: String.IndexOf"
- In reply to: BobTheHacker: "String.IndexOf"
- Next in thread: BobTheHacker: "Re: String.IndexOf"
- Reply: BobTheHacker: "Re: String.IndexOf"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 3 Aug 2004 18:38:19 +0100
BobTheHacker <BobTheHacker@discussions.microsoft.com> wrote:
> For some reason my index of is not finding my string. If I understand
> correctly my code below should upper case the string being searched
> (within an internal buffer), upper case the string to find and return
> the index value. Well it is finding the last occurence and skipping
> the first occurence. Is there something I am not understanding
> correctly?
>
> icnt = strBuffer.ToLower().IndexOf(strOuterTag.ToLower());
>
> I am searching for <OUTSPEC> and the first occurence in the string is
> <outspec>.
Could you post a short but complete program which demonstrates the
problem?
See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Nick Carter: "AssemblyBuilder, al.exe and the /embed switch"
- Previous message: BobTheHacker: "RE: String.IndexOf"
- In reply to: BobTheHacker: "String.IndexOf"
- Next in thread: BobTheHacker: "Re: String.IndexOf"
- Reply: BobTheHacker: "Re: String.IndexOf"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|