regex_matches   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/adt.xtm

Implementation

(bind-func regex_matches
  (lambda (regex:i8* str:i8* maxnum:i64)
    (let ((slen:i64 (strlen str))
          (results:i8** (salloc maxnum))
          (resdata:i8* (salloc (* slen maxnum)))
          (result:String* null) (i:i64 0) (num 0))
      (dotimes (i maxnum) (pset! results i (pref-ptr resdata (* i slen))))
      (set! num (rmatches regex str results maxnum))
      (if (> num 0)
          (map (lambda (i:i64) (Str (pref results i)))
               (range 0 num))
          null))))


Back to Index

Similar Entries

  • get-true-matches    scheme
  • impc:ir:regex-structs-or-atoms    scheme
  • impc:ir:regex-tc-or-a    scheme
  • p:if-matches    scheme
  • p:matches?    scheme
  • regex:replace-all    scheme
  • regex:replace-everything    scheme
  • regex:type-split    scheme
  • regex_match    xtlang
  • regex_match    xtlang
  • regex_match    xtlang
  • regex_match    xtlang
  • regex_matches    xtlang
  • regex_matches    xtlang
  • regex_matches    xtlang
  • regex_matches    xtlang
  • regex_matches    xtlang
  • regex_replace    xtlang
  • regex_replace    xtlang
  • regex_replace    xtlang
  • regex_replace    xtlang
  • regex_replace_all    xtlang
  • regex_replace_all    xtlang
  • regex_replace_all    xtlang
  • regex_replace_all    xtlang
  • regex_split    xtlang
  • regex_split    xtlang