Class Varchars

java.lang.Object
io.trino.spi.type.Varchars

public final class Varchars extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    byteCount(io.airlift.slice.Slice slice, int offset, int length, int codePointCount)
    Get the byte count of a given slice with in range [offset, offset + length) for at most codePointCount many code points
    static io.airlift.slice.Slice
    truncateToLength(io.airlift.slice.Slice slice, int maxLength)
     
    static io.airlift.slice.Slice
    truncateToLength(io.airlift.slice.Slice slice, Type type)
     
    static io.airlift.slice.Slice
    truncateToLength(io.airlift.slice.Slice slice, VarcharType varcharType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • truncateToLength

      public static io.airlift.slice.Slice truncateToLength(io.airlift.slice.Slice slice, Type type)
    • truncateToLength

      public static io.airlift.slice.Slice truncateToLength(io.airlift.slice.Slice slice, VarcharType varcharType)
    • truncateToLength

      public static io.airlift.slice.Slice truncateToLength(io.airlift.slice.Slice slice, int maxLength)
    • byteCount

      public static int byteCount(io.airlift.slice.Slice slice, int offset, int length, int codePointCount)
      Get the byte count of a given slice with in range [offset, offset + length) for at most codePointCount many code points