Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#111 closed Feature Request (Rejected)

Extension to StringinStr to allow search from position as well as from occurrence (100% backwards compatible )

Reported by: Fox2 Owned by:
Milestone: Component: AutoIt
Version: Severity:
Keywords: StringInStr Cc:

Description

An additional flag parameter, also optional, that if you specify "occurrence" as a parameter, you can also after it specify "search type" too. The new description would be like this. Note this is 100% compatible with existing syntax, and defaults to the current behavior:

UPDATED SYNTAX AND DESCRIPTION:

StringInStr ( "string", "substring" , casesense [, from [, search type?] )

from [optional], search type [optional]

Depending on search type, directs StringInStr to either find a given occurrance of a substring (default behavior), or search for a substring from a given position.

If search type is zero or omitted (default) then "from" represents an occurrence of the substring to find in the string. Use a negative occurrence to search from the right side. The default value is 1 (finds first occurrence).

If search type = 1 then "from" represents a position to start searching for the substring in the string (1 = first character). Use a negative occurrence to search from a number of characters from the right side. The default value is 1 (finds first occurrence from the start of the string).

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by Valik

  • Resolution set to rejected
  • Status changed from new to closed

What you ask for can be done with regular expressions (StringRegExp()). It would be somewhat easy to write a function with StringRegExp() at it's heart to implement all the functionality you ask for (except perhaps the negative position, I'm not sure if StringRegExp() supports that).

Resolving as rejected.

comment:2 Changed 16 years ago by TicketCleanup

  • Version 3.2.10.0 deleted

Automatic ticket cleanup.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.