o

sjsonnet

Format

object Format

Minimal re-implementation of Python's % formatting logic, since Jsonnet's % formatter is basically "do whatever python does", with a link to:

- https://docs.python.org/2/library/stdtypes.html#string-formatting

Parses the formatted strings into a sequence of literal strings separated by % interpolations modelled as structured Format.FormatSpecs, and use those to decide how to inteprolate the provided Jsonnet Vals into the final string.

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

Type Members

  1. case class FormatSpec(label: Option[String], alternate: Boolean, zeroPadded: Boolean, leftAdjusted: Boolean, blankBeforePositive: Boolean, signCharacter: Boolean, width: Option[Int], precision: Option[Int], conversion: Char) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def conversion[_](implicit arg0: P[Any]): P[String]
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def flags[_](implicit arg0: P[Any]): P[String]
  11. def format(s: String, values0: Val, offset: Int)(implicit fileScope: FileScope, evaluator: EvalScope): String
  12. def format[_](implicit arg0: P[Any]): P[(String, Seq[(FormatSpec, String)])]
  13. def formatExponent(formatted: FormatSpec, s: Double): String
  14. def formatFloat(formatted: FormatSpec, s: Double): String
  15. def formatGeneric(formatted: FormatSpec, s: Double): String
  16. def formatHexadecimal(formatted: FormatSpec, s: Double): String
  17. def formatInteger(formatted: FormatSpec, s: Double): String
  18. def formatOctal(formatted: FormatSpec, s: Double): String
  19. def formatSpec[_](implicit arg0: P[Any]): P[FormatSpec]
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def integer[_](implicit arg0: P[Any]): P[Unit]
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def label[_](implicit arg0: P[Any]): P[Option[String]]
  25. def maybeDecimalPoint(formatted: FormatSpec, fracLengths: (Int, Int)): Option[(Int, Int)]
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def plain[_](implicit arg0: P[Any]): P[String]
  30. def precision[_](implicit arg0: P[Any]): P[Option[String]]
  31. def precisionPad(lhs: String, rhs: String, precision: Option[Int]): String
  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  37. def widen(formatted: FormatSpec, lhs: String, mhs: String, rhs: String, numeric: Boolean, signedConversion: Boolean): String
  38. def widenRaw(formatted: FormatSpec, txt: String): String
  39. def width[_](implicit arg0: P[Any]): P[Option[String]]

Inherited from AnyRef

Inherited from Any

Ungrouped