time-to-botec

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

repl.txt (848B)


      1 
      2 {{alias}}( str, len[, pad] )
      3     Left pads a `string` such that the padded `string` has a length of at least
      4     `len`.
      5 
      6     An output string is not guaranteed to have a length of exactly `len`, but to
      7     have a length of at least `len`. To generate a padded string having a length
      8     equal to `len`, post-process a padded string by trimming off excess
      9     characters.
     10 
     11     Parameters
     12     ----------
     13     str: string
     14         Input string.
     15 
     16     len: integer
     17         Minimum string length.
     18 
     19     pad: string (optional)
     20         String used to pad. Default: ' '.
     21 
     22     Returns
     23     -------
     24     out: string
     25         Padded string.
     26 
     27     Examples
     28     --------
     29     > var out = {{alias}}( 'a', 5 )
     30     '    a'
     31     > out = {{alias}}( 'beep', 10, 'b' )
     32     'bbbbbbbeep'
     33     > out = {{alias}}( 'boop', 12, 'beep' )
     34     'beepbeepboop'
     35 
     36     See Also
     37     --------
     38