hiAddNonRepeatPrefix
hiAddNonRepeatPrefix(t_prefix) =>t / nil
Description
Adds a string to the list of repeat filter strings. All strings is compared on every command run.
Any command that matches the prefix, for the number of characters of the prefix, does not get repeated by the hiRepeat command.
Arguments
|
The string prefix to be added to the list of repeat filter strings. |
Values Returned
|
String prefix successfully added to the list of repeat filter strings. |
|
|
The t_prefix value is either empty or in an invalid format. A warning message is displayed in the CIW. |
Examples
This section explains the use model of hiAddNonRepeatPrefix().
-
If a prefix is added that is more generic than a prefix that already exists in the list, the new prefix is added and it supersedes the more specific filter.
For example:
AshiAddNonRepeatPrefix( "println" ) => t hiAddNonRepeatPrefix( "print" ) => tprintfilters more thanprintln, that is, it is more generic, onlyprintis used for filtering unless it is removed usinghiRemoveNonRepeatPrefix(). However,printlnstill exist in a superseded state, removing “print” would causeprintlnto be used as a filter. -
The command returns
nil, and does not add the prefix to the list of repeat filter strings if another prefix is added with this function, as it would cause the same item to be filtered again.
For example:hiAddNonRepeatPrefix(
The list contains"print") => t hiAddNonRepeatPrefix("println") => nilprint, but notprintlnafter the above commands are run. -
The prefix
printwould filter any command that begins withprint, such as:println(
or"Hello, world")printf (
but would not filter commands that simply contain the word"x = %d\n"x )print, such as:printf ( MyStr “name = %s” MyName )
Related Topics
General Environmental Functions
Return to top