Package

com.github.plokhotnyuk

fsi

Permalink

package fsi

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

Type Members

  1. implicit final class FastStringInterpolator extends AnyVal

    Permalink

    Implicit class that introduces fs and fraw string interpolators which are high-performance 100% compatible drop-in replacement of simple & raw string interpolators (s"" or raw"" literals).

    Implicit class that introduces fs and fraw string interpolators which are high-performance 100% compatible drop-in replacement of simple & raw string interpolators (s"" or raw"" literals).

    Here's an example of usage:

    val host = "company.com"
    val path = "blog"
    println(fs"http://$host/$path")
    println(fraw"http://$host/$path")

    It will print 2 strings:

    http://company.com/blog
    http://company.com/blog

    Let we have defined functions: def f(): Int and def g(): Double, then in compile-time for fs"a${f()}bb${g()}" the following code will be generated:

    {
      val fresh$macro$1: Int = f();
      val fresh$macro$2: Double = g();
      com.github.plokhotnyuk.fsi.`package`.stringBuilder().append('a').append(fresh$macro$1).append("bb").append(fresh$macro$2).toString()
    }: String

Value Members

  1. def stringBuilder(): StringBuilder

    Permalink

    A method to access the thread-local pool for cached string builder instances.

    A method to access the thread-local pool for cached string builder instances. It is used internally in generated code.

    WARNING: Do not reuse an instance of cached string builder in nested functions or in different threads.

    returns

    a cached instance of java.lang.StringBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped