Go to the first, previous, next, last section, table of contents.


getKeysByPrefix[

Function: getKeysByPrefix[
file: job.t
package: muf
status: alpha

The getKeysByPrefix[ function takes an object and a string, and returns all public keys on the object which start with the given string. If any key matches the string exactly, only that key is returned, even if other keys have the string as a prefix.

This is intended to be useful for command interpreters which allow abbreviation of commands to any unique prefix: The presumption is that an exact match will be executed, but a multiple matches will result in querying the user to select one of the alternatives.

This search could easily be coded in MUF, but can run much faster in C:

makeIndex --> o
Stack:
1 --> o.a   1 --> o.ba   1 --> o.bb   1 --> o.c
Stack: 
o "b" getKeysByPrefix[
Stack: [ "ba" "bb" |


Go to the first, previous, next, last section, table of contents.