Renaming of some of Pod::Simple's test files to make it more 8.3
[p5sagit/p5-mst-13.2.git] / lib / bytes_heavy.pl
index 47bdbf9..923381d 100644 (file)
@@ -5,4 +5,36 @@ sub length ($) {
     return CORE::length($_[0]);
 }
 
+sub substr ($$;$$) {
+    BEGIN { bytes::import() }
+    return
+       @_ == 2 ? CORE::substr($_[0], $_[1]) :
+       @_ == 3 ? CORE::substr($_[0], $_[1], $_[2]) :
+                 CORE::substr($_[0], $_[1], $_[2], $_[3]) ;
+}
+
+sub ord ($) {
+    BEGIN { bytes::import() }
+    return CORE::ord($_[0]);
+}
+
+sub chr ($) {
+    BEGIN { bytes::import() }
+    return CORE::chr($_[0]);
+}
+
+sub index ($$;$) {
+    BEGIN { bytes::import() }
+    return
+       @_ == 2 ? CORE::index($_[0], $_[1]) :
+                 CORE::index($_[0], $_[1], $_[2]) ;
+}
+
+sub rindex ($$;$) {
+    BEGIN { bytes::import() }
+    return
+       @_ == 2 ? CORE::rindex($_[0], $_[1]) :
+                 CORE::rindex($_[0], $_[1], $_[2]) ;
+}
+
 1;