trait Filters extends AnyRef
A collection of useful string filters. They are particularly intended to be filters for pretty-printer output so that the output can be tailored for a restricted setting in which it will be put. E.g., a program might be pretty-printed to show in a GUI window of a particular size, or lines indented greater than a certain amount might be omitted to show an overview.
- Source
- Filters.scala
- Alphabetic
- By Inheritance
- Filters
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
indentOf(s: String): Int
Return the indentation of a line, i.e., the number of spaces that appear before the first non-space character.
-
def
indentedEllipsis(n: Int, s: String): String
A replacement function that when given an integer
nreturns the string"..."preceded bynspaces.A replacement function that when given an integer
nreturns the string"..."preceded bynspaces. The string argumentsis ignored. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
keepMaxChars(n: Int)(s: String): String
A filter that limits the string
sto at mostncharacters. -
def
keepMaxIndent(n: Int, s: String, mkrepl: (Int, String) ⇒ String = indentedEllipsis): String
A filter that replaces runs of lines that have an indentation level of at least
nspaces.A filter that replaces runs of lines that have an indentation level of at least
nspaces. A run of replaced lines will be replaced by the result of a callmkrepl (n, l)wherelis the first line of the run. By default,mkreplisindentedEllipsis. -
def
keepMaxLines(n: Int)(s: String): String
A filter that limits the string
sto at mostncompleted lines.A filter that limits the string
sto at mostncompleted lines. The final end of line is included. -
def
keepMaxWords(n: Int)(s: String): String
A filter that limits the string
sto at mostnwords.A filter that limits the string
sto at mostnwords. A word is one or more consecutive non-whitespace characters. The whitespace after the last word (if any) is not included. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )