time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (652B)


      1 
      2 {{alias}}( str[, fromIndex] )
      3     Returns the previous extended grapheme cluster break in a string before a
      4     specified position.
      5 
      6     Parameters
      7     ----------
      8     str: string
      9         Input string.
     10 
     11     fromIndex: integer (optional)
     12         Position. Default: str.length-1.
     13 
     14     Returns
     15     -------
     16     out: integer
     17         Previous extended grapheme cluster break position.
     18 
     19     Examples
     20     --------
     21     > var out = {{alias}}( 'last man standing', 4 )
     22     3
     23     > out = {{alias}}( 'presidential election', 8 )
     24     7
     25     > out = {{alias}}( 'अनुच्छेद', 2 )
     26     0
     27     > out = {{alias}}( '🌷', 1 )
     28     -1
     29 
     30     See Also
     31     --------