|
@@ -3,7 +3,7 @@ import python.lib.Re;
|
|
|
import python.lib.Re.MatchObject;
|
|
|
import python.lib.Re.Pattern;
|
|
|
|
|
|
-//@:coreApi
|
|
|
+@:coreApi
|
|
|
class EReg {
|
|
|
|
|
|
/**
|
|
@@ -115,8 +115,8 @@ class EReg {
|
|
|
|
|
|
If `s` is null, the result is unspecified.
|
|
|
**/
|
|
|
- public function matchSub( s : String, pos : Int, ?len : Int):Bool {
|
|
|
- if (len != null) {
|
|
|
+ public function matchSub( s : String, pos : Int, len : Int = -1):Bool {
|
|
|
+ if (len != -1) {
|
|
|
matchObj = pattern.search(s, pos, pos+len);
|
|
|
} else {
|
|
|
matchObj = pattern.search(s, pos);
|