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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped