(prefix)
| 100 | } |
| 101 | |
| 102 | test(prefix) { |
| 103 | let {args, returns} = this.resolve(prefix); |
| 104 | let from = 0; |
| 105 | let text = args[0]; |
| 106 | if(typeof text !== "string") return false; |
| 107 | let to = text.length; |
| 108 | if (args[1] != undefined) from = args[1] - 1; |
| 109 | if (args[2] != undefined) to = args[2]; |
| 110 | return text.substring(from, to) === returns[0]; |
| 111 | } |
| 112 | |
| 113 | // substring always returns cardinality 1 |
| 114 | getProposal(tripleIndex, proposed, prefix) { |