Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 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 by Valik, 18 years ago

Resolution: rejected
Status: newclosed

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 by TicketCleanup, 18 years ago

Version: 3.2.10.0

Automatic ticket cleanup.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.