@@ -482,6 +482,20 @@ Return a hash. The first argument is a key, the second its value, and so on.
482
482
Be sure to pass an even number of arguments, a VM specific error may occur
483
483
otherwise.
484
484
485
+ ## index
486
+ * ` index(str $haystack, str $needle) `
487
+ * ` index(str $haystack, str $needle, int $pos) `
488
+
489
+ Return the position in ` $haystack ` at which ` $needle ` appears, or -1
490
+ if ` $needle ` does not appear. Begin searching at position ` $pos ` if specified,
491
+ or at 0, otherwise.
492
+
493
+ ## indexfrom
494
+ * ` indexfrom(str $haystack, str $needle, int $pos) `
495
+
496
+ Return the position in ` $haystack ` at which ` $needle ` appears, or -1
497
+ if ` $needle ` does not appear. Begin searching at position ` $pos ` .
498
+
485
499
## iscclass
486
500
* ` iscclass(int $class, str $str, int $i) `
487
501
@@ -543,6 +557,26 @@ The $flags is a bitmask that modifies the parse and/or result:
543
557
Replace the the characters of ` $str ` starting at ` $offset ` for ` $count `
544
558
characters, with the ` $replacement ` string.
545
559
560
+ ## rindex
561
+ * ` rindex(str $haystack, str $needle) `
562
+ * ` rindex(str $haystack, str $needle, int $pos) `
563
+
564
+ Searching backwards through the ` $haystack ` , return the position at which
565
+ ` $needle ` appears, or -1 if it does not. Begin searching at ` $pos ` if
566
+ specified, otherwise start from the last position.
567
+
568
+ ## rindexfrom
569
+ * ` rindexfrom(str $haystack, str $needle, int $pos) `
570
+
571
+ Searching backwards through the ` $haystack ` , starting at ` $pos ` return the
572
+ position at which ` $needle ` appears, or -1 if it does not.
573
+
574
+ ## rindexfromend
575
+ * ` rindexfromend(str $haystack, str $needle) `
576
+
577
+ Searching backwards through the ` $haystack ` , return the position at which
578
+ ` $needle ` appears, or -1 if it does not.
579
+
546
580
## uc
547
581
* ` uc(str $str) `
548
582
@@ -1127,7 +1161,7 @@ Convert Big Integer value to a native number.
1127
1161
Given a Perl 6 object, return a native with the same value,
1128
1162
of the type indicated by the opcode suffix.
1129
1163
1130
- # OO Opcodes
1164
+ # OO/SixModel Opcodes
1131
1165
1132
1166
## can
1133
1167
* ` can(Any $obj, str $method) `
@@ -1152,6 +1186,41 @@ Returns 1 if the objects are the same object in the underlying VM,
1152
1186
If the object has a method of the given name, return it. Otherwise,
1153
1187
throw an exception.
1154
1188
1189
+ ## how
1190
+ * ` how(Any $obj) `
1191
+
1192
+ NQP equivalent for Perl 6's ` $obj.HOW ` .
1193
+
1194
+ ## rebless
1195
+ * ` rebless(Any $obj, Type $type) `
1196
+
1197
+ Convert ` $obj ` to be an object of the new ` $type ` .
1198
+
1199
+ ## reprname
1200
+ * ` reprname(Any $obj) `
1201
+
1202
+ Return the name of the REPR for the given object.
1203
+
1204
+ ## setwho
1205
+ * ` setwho(Any $obj, Any $who) `
1206
+
1207
+ Replace ` $obj ` 's WHO. Return ` $obj ` .
1208
+
1209
+ ## who
1210
+ * ` who(Any $obj) `
1211
+
1212
+ NQP equivalent for Perl 6's ` $obj.WHO ` .
1213
+
1214
+ ## what
1215
+ * ` what(Any $obj) `
1216
+
1217
+ NQP equivalent for Perl 6's ` $obj.WHAT ` .
1218
+
1219
+ ## where
1220
+ * ` where(Any $obj) `
1221
+
1222
+ Return a unique ID for this ` $obj ` .
1223
+
1155
1224
# Bit Opcodes
1156
1225
1157
1226
## bitand
0 commit comments