logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Description

INTcount(STRINGs)
       Returns the number of ascii characters in S, or -1 if S is null.

   BOOLstartswith(STRINGs1,STRINGs2)
       Returns true if S1 starts with S2.

   BOOLendswith(STRINGs1,STRINGs2)
       Returns true if S1 ends with S2.

   BOOLcontains(STRINGs1,STRINGs2)
       Returns true if S1 contains S2.

   STRINGtake(STRINGs,INTn,INToffset=0)
       Returns  a  string  composed of the N first characters of S. If S is shorter than N character, the return
       string is truncated. If S is NULL, NULL is returned.

       A negative offset means "from the end of the string" and a negative n means "left of the offset".

   STRINGreverse(STRINGs)
       Reverse s.

   STRINGsplit(STRINGS,INTn,STRINGsep="t")
       Split s and return the n-th token. Characters in sep are separators. A negative n indicate "from the  end
       of the string".

   BOOLtoken_intersect(STRINGstr1,STRINGstr2,[STRINGseparators])
          BOOL token_intersect(
             STRING str1,
             STRING str2,
             [STRING separators]
          )

       Checks  if the set tokens in one string intersects the set of tokens in the other string. In other words,
       it returns true if there is a token which exists in both strings.

       If the separators argument is not supplied, the space and comma  characters  are  the  separators.  Empty
       tokens are ignored in both strings.

Name

       vmod_str - Str VMOD

Synopsis

          import str [as name] [from "path"]

          INT count(STRING s)

          BOOL startswith(STRING s1, STRING s2)

          BOOL endswith(STRING s1, STRING s2)

          BOOL contains(STRING s1, STRING s2)

          STRING take(STRING s, INT n, INT offset)

          STRING reverse(STRING s)

          STRING split(STRING S, INT n, STRING sep)

          BOOL token_intersect(STRING str1, STRING str2, [STRING separators])

See Also