instr function

Results 1 to 4 of 4

Thread: instr function

  1. #1
    Curtis Guest

    Default instr function

    does it return the value of the position of the "FIRST" space in a string? or does it return something else.. like "all the values for all the spaces in a string.." .. I know this question sounds dumb, but I need to know that it just returns the value for the "FIRST" space in the selected string.

  2. #2
    Curtis Guest

    Default RE: instr function(ie.)

    for example:<BR>&#060;%<BR>dim blah<BR>dim findspace<BR><BR>blah = "this is an example"<BR><BR>findspace = instr(blah," ")<BR><BR>&#039k now will findspace be equal to 4? or will it be equal to like<BR>&#039 4710 ? or something totally different... ? please tell me if<BR>&#039I&#039m right or not. "I THINK IT WILL BE 4"<BR>%&#062;

  3. #3
    Join Date
    Dec 1969

    Default RE: instr function(ie.)

    Straight from the help. under VBScript/Documentation/Language Reference/InStr<BR><BR>InStr Function<BR>Returns the position of the first occurrence of one string within another.<BR><BR>InStr([start, ]string1, string2[, compare])<BR><BR>Instr(blah," ") in your example will return the first occurence of a space in the string "this is an example" which is 5. <BR><BR>Instr returns 0 when there are no occurences.<BR>

  4. #4
    Curtis Guest

    Default RE: instr function(ie.)

    thank-you very much sir.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts