Re: Function instr

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Thu, 9 Apr 2009 20:34:04 -0700, AJOLSON wrote:

What would the code be to find the next character in a string

I have so far

Strtemp = instr(strin," ")
I just donʼt know what to put between the " " to get the count to the next
character. No matter what the next character is.

Any help would be great.

Thanks

Your example is not very illuminating.
1) InStr() returns a Number value, not a string value, so StrTemp
should be a number variable, not a string variable.

2) What do you mean by 'find the next character' in a string?
What do you mean by this " No matter what the next character is"?
How can you search for a character if you do not know what it is?

To use InStr()....
InStr("YourString","r") = 4
if the count starts at the before the first "r" of the string.
InStr("YourStrings" = 7
if the count starts after the first "r".

If you meant something else, please re-think your question and post
back.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.



Relevant Pages

  • [TOMOYO #15 3/8] Common functions for TOMOYO Linux.
    ... This file contains common functions (e.g. policy I/O, pattern matching). ... Since TOMOYO Linux is a name based access control, ... TOMOYO Linux's string manipulation functions make reviewers feel crazy, ... the Linux kernel accepts all characters but NUL character ...
    (Linux-Kernel)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)
  • Re: RfD: Escaped Strings
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... \b BS (backspace, ASCII 8) ... \ ** escapes to characters much as C does. ...
    (comp.lang.forth)
  • RE: Insert spaces into String
    ... I have a relatively small data set so I can eye ... Dim strTemp As String, strChr As String ... The function works by walking through each character in the string and ...
    (microsoft.public.access.queries)