Packages

  • package root
    Definition Classes
    root
  • package grizzled

    The Grizzled Scala Library contains a variety of miscellaneous, general purpose utility classes and objects.

    The Grizzled Scala Library contains a variety of miscellaneous, general purpose utility classes and objects.

    The home page for the Grizzled Scala Library is http://software.clapper.org/grizzled-scala/. Please see that page for complete details, including installation instructions.

    Definition Classes
    root
  • package ScalaCompat

    Compatibility definitions for Scala 2.13+ vs.

    Compatibility definitions for Scala 2.13+ vs. Scala 2.12 and lesser. This object is conceptually similar to scala.collection.compat. For Scala 2.12 and earlier, it provides a type alias and compatibility functions for LazyList. For Scala 2.13 and greater, it's empty. Thus, all code can use LazyList throughout.

    Definition Classes
    grizzled
  • package collection

    Some collection-related helpers.

    Some collection-related helpers.

    Definition Classes
    grizzled
  • package config

    Classes and objects to aid in the parsing of INI-style configuration files.

    Classes and objects to aid in the parsing of INI-style configuration files. This package is similar, in concept, to the Python ConfigParser module (though its implementation and capabilities differ quite a bit).

    Definition Classes
    grizzled
  • package datetime
    Definition Classes
    grizzled
  • package file

    File-related classes and utilities.

    File-related classes and utilities. This package is distinguished from the grizzled.io package in that this package operates on files and paths, not on open streams or sources.

    Definition Classes
    grizzled
    See also

    grizzled.io

  • package io

    I/O-related classes and utilities.

    I/O-related classes and utilities. This package is distinguished from the grizzled.file package in that this package operates on already-open Java InputStream, OutputStream, Reader and Writer objects, and on Scala Source objects.

    See grizzled.file

    Definition Classes
    grizzled
  • package math

    Miscellaneous math and statistics utilities.

    Miscellaneous math and statistics utilities.

    Definition Classes
    grizzled
  • package net

    Network-related utility methods and classes.

    Network-related utility methods and classes.

    Definition Classes
    grizzled
  • package parsing

    Methods and classes useful for parsing various things.

    Methods and classes useful for parsing various things.

    Definition Classes
    grizzled
  • package random
    Definition Classes
    grizzled
  • package security
    Definition Classes
    grizzled
  • package string

    String- and text-related classes.

    String- and text-related classes.

    Definition Classes
    grizzled
  • package template

    Scala classes that provide for variable substitution within strings, akin to the Python StringTemplate library.

    Scala classes that provide for variable substitution within strings, akin to the Python StringTemplate library. Several syntaxes are supported.

  • Implicits
  • WordWrapper
  • util
  • package util

    Miscellaneous utility functions and methods not otherwise categorized.

    Miscellaneous utility functions and methods not otherwise categorized.

    Definition Classes
    grizzled
  • package zip

    The grizzled.zip package contains classes and functions to make it easier to operate on zip and jar files.

    The grizzled.zip package contains classes and functions to make it easier to operate on zip and jar files.

    Definition Classes
    grizzled
p

grizzled

string

package string

String- and text-related classes.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. string
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class WordWrapper(wrapWidth: Int = 79, indentation: Int = 0, prefix: String = "", ignore: Set[Char] = Set.empty[Char], indentChar: Char = ' ') extends Product with Serializable

    Wraps strings on word boundaries to fit within a proscribed output width.

    Wraps strings on word boundaries to fit within a proscribed output width. The wrapped string may have a prefix or not; prefixes are useful for error messages, for instance. You tell a WordWrapper about a prefix by passing a non-empty prefix to the constructor.

    Examples:

    Unable to open file /usr/local/etc/wombat: No such file or directory

    might appear like this without a prefix:

    Unable to open file /usr/local/etc/wombat: No such file or
    directory

    and like this if the prefix is "myprog:"

    myprog: Unable to open file /usr/local/etc/wombat: No such
            file or directory

    Alternatively, if the output width is shortened, the same message can be made to wrap something like this:

    myprog: Unable to open file
            /usr/local/etc/wombat:
            No such file or
            directory

    Note how the wrapping logic will "tab" past the prefix on wrapped lines.

    This method also supports the notion of an indentation level, which is independent of the prefix. A non-zero indentation level causes each line, including the first line, to be indented that many characters. Thus, initializing a WordWrapper object with an indentation value of 4 will cause each output line to be preceded by 4 blanks. (It's also possible to change the indentation character from a blank to any other character.

    Notes

    - The class does not do any special processing of tab characters. Embedded tab characters can have surprising (and unwanted) effects on the rendered output. - Wrapping an already wrapped string is an invitation to trouble.

    wrapWidth

    the number of characters after which to wrap each line

    indentation

    how many characters to indent

    prefix

    the prefix to use, or "" for none. Cannot be null.

    ignore

    set of characters to ignore when calculating wrapping. This feature can be useful when certain characters represent escape characters, and you intend to post-process the wrapped string.

    indentChar

    the indentation character to use.

Value Members

  1. object Implicits

    String and character implicits.

  2. object util

    Useful string-related utility functions.

Inherited from AnyRef

Inherited from Any

Ungrouped