diff options
author | Chaosus <chaosus89@gmail.com> | 2019-01-18 11:29:28 +0300 |
---|---|---|
committer | Chaosus <chaosus89@gmail.com> | 2019-07-23 18:55:54 +0300 |
commit | 080c0bb7fea824f231e8972fe1e7f82290a2f453 (patch) | |
tree | 70c99fe65ad4e7a4d294206e1c65345e6f30116b /core/variant_call.cpp | |
parent | c7a427241e7f4dd6ab9ac89f51d3bb9f6632008b (diff) |
Added count method to String
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r-- | core/variant_call.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index b637e745af..377cc889b8 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -237,6 +237,8 @@ struct _VariantCall { VCALL_LOCALMEM1R(String, casecmp_to); VCALL_LOCALMEM1R(String, nocasecmp_to); VCALL_LOCALMEM0R(String, length); + VCALL_LOCALMEM3R(String, count); + VCALL_LOCALMEM3R(String, countn); VCALL_LOCALMEM2R(String, substr); VCALL_LOCALMEM2R(String, find); VCALL_LOCALMEM1R(String, find_last); @@ -1502,6 +1504,9 @@ void register_variant_methods() { ADDFUNC2R(STRING, INT, String, find, STRING, "what", INT, "from", varray(0)); + ADDFUNC3R(STRING, INT, String, count, STRING, "what", INT, "from", INT, "to", varray(0, 0)); + ADDFUNC3R(STRING, INT, String, countn, STRING, "what", INT, "from", INT, "to", varray(0, 0)); + ADDFUNC1R(STRING, INT, String, find_last, STRING, "what", varray()); ADDFUNC2R(STRING, INT, String, findn, STRING, "what", INT, "from", varray(0)); ADDFUNC2R(STRING, INT, String, rfind, STRING, "what", INT, "from", varray(-1)); |