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
  2. class PartialApplyFmt extends Builtin1

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(leading: String, chunks: Seq[(FormatSpec, String)], values0: Val, pos: Position)(implicit evaluator: EvalScope): String
  12. def format(s: String, values0: Val, pos: Position)(implicit evaluator: EvalScope): String
  13. def format[_](implicit arg0: P[Any]): P[(String, Seq[(FormatSpec, String)])]
  14. def formatExponent(formatted: FormatSpec, s: Double): String
  15. def formatFloat(formatted: FormatSpec, s: Double): String
  16. def formatGeneric(formatted: FormatSpec, s: Double): String
  17. def formatHexadecimal(formatted: FormatSpec, s: Double): String
  18. def formatInteger(formatted: FormatSpec, s: Double): String
  19. def formatOctal(formatted: FormatSpec, s: Double): String
  20. def formatSpec[_](implicit arg0: P[Any]): P[FormatSpec]
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def integer[_](implicit arg0: P[Any]): P[Unit]
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def label[_](implicit arg0: P[Any]): P[Option[String]]
  26. def maybeDecimalPoint(formatted: FormatSpec, fracLengths: (Int, Int)): Option[(Int, Int)]
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. def plain[_](implicit arg0: P[Any]): P[String]
  31. def precision[_](implicit arg0: P[Any]): P[Option[String]]
  32. def precisionPad(lhs: String, rhs: String, precision: Option[Int]): String
  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  38. def widen(formatted: FormatSpec, lhs: String, mhs: String, rhs: String, numeric: Boolean, signedConversion: Boolean): String
  39. def widenRaw(formatted: FormatSpec, txt: String): String
  40. def width[_](implicit arg0: P[Any]): P[Option[String]]

Inherited from AnyRef

Inherited from Any

Ungrouped