Class LibCString

java.lang.Object
org.lwjgl.system.libc.LibCString

public class LibCString extends Object
Native bindings to string.h.
  • Method Details

    • nmemset

      public static long nmemset(long dest, int c, long count)
      Parameters:
      count - number of bytes to fill
    • memset

      public static long memset(ByteBuffer dest, int c)
      Fills a memory area with a constant byte.
      Parameters:
      dest - pointer to the memory area to fill
      c - byte to set
      Returns:
      the value of dest
    • memset

      public static long memset(ShortBuffer dest, int c)
      Fills a memory area with a constant byte.
      Parameters:
      dest - pointer to the memory area to fill
      c - byte to set
      Returns:
      the value of dest
    • memset

      public static long memset(IntBuffer dest, int c)
      Fills a memory area with a constant byte.
      Parameters:
      dest - pointer to the memory area to fill
      c - byte to set
      Returns:
      the value of dest
    • memset

      public static long memset(LongBuffer dest, int c)
      Fills a memory area with a constant byte.
      Parameters:
      dest - pointer to the memory area to fill
      c - byte to set
      Returns:
      the value of dest
    • memset

      public static long memset(FloatBuffer dest, int c)
      Fills a memory area with a constant byte.
      Parameters:
      dest - pointer to the memory area to fill
      c - byte to set
      Returns:
      the value of dest
    • memset

      public static long memset(DoubleBuffer dest, int c)
      Fills a memory area with a constant byte.
      Parameters:
      dest - pointer to the memory area to fill
      c - byte to set
      Returns:
      the value of dest
    • nmemcpy

      public static long nmemcpy(long dest, long src, long count)
      Parameters:
      count - the number of bytes to be copied
    • memcpy

      public static long memcpy(ByteBuffer dest, ByteBuffer src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memcpy

      public static long memcpy(ShortBuffer dest, ShortBuffer src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memcpy

      public static long memcpy(IntBuffer dest, IntBuffer src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memcpy

      public static long memcpy(LongBuffer dest, LongBuffer src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memcpy

      public static long memcpy(FloatBuffer dest, FloatBuffer src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memcpy

      public static long memcpy(DoubleBuffer dest, DoubleBuffer src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • nmemmove

      public static long nmemmove(long dest, long src, long count)
      Parameters:
      count - the number of bytes to be copied
    • memmove

      public static long memmove(ByteBuffer dest, ByteBuffer src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memmove

      public static long memmove(ShortBuffer dest, ShortBuffer src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memmove

      public static long memmove(IntBuffer dest, IntBuffer src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memmove

      public static long memmove(LongBuffer dest, LongBuffer src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memmove

      public static long memmove(FloatBuffer dest, FloatBuffer src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memmove

      public static long memmove(DoubleBuffer dest, DoubleBuffer src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • nstrlen

      public static long nstrlen(long str)
    • strlen

      public static long strlen(ByteBuffer str)
    • nstrerror

      public static long nstrerror(int errnum)
      Unsafe version of: strerror(int)
    • strerror

      @Nullable public static String strerror(int errnum)
      Returns string describing error number.
    • nmemset

      public static long nmemset(byte[] dest, int c, long count)
      Array version of: nmemset(long, int, long)
    • memset

      public static long memset(byte[] dest, int c)
    • nmemset

      public static long nmemset(short[] dest, int c, long count)
      Array version of: nmemset(long, int, long)
    • memset

      public static long memset(short[] dest, int c)
    • nmemset

      public static long nmemset(int[] dest, int c, long count)
      Array version of: nmemset(long, int, long)
    • memset

      public static long memset(int[] dest, int c)
    • nmemset

      public static long nmemset(long[] dest, int c, long count)
      Array version of: nmemset(long, int, long)
    • memset

      public static long memset(long[] dest, int c)
    • nmemset

      public static long nmemset(float[] dest, int c, long count)
      Array version of: nmemset(long, int, long)
    • memset

      public static long memset(float[] dest, int c)
    • nmemset

      public static long nmemset(double[] dest, int c, long count)
      Array version of: nmemset(long, int, long)
    • memset

      public static long memset(double[] dest, int c)
    • nmemcpy

      public static long nmemcpy(byte[] dest, byte[] src, long count)
      Array version of: nmemcpy(long, long, long)
    • memcpy

      public static long memcpy(byte[] dest, byte[] src)
    • nmemcpy

      public static long nmemcpy(short[] dest, short[] src, long count)
      Array version of: nmemcpy(long, long, long)
    • memcpy

      public static long memcpy(short[] dest, short[] src)
    • nmemcpy

      public static long nmemcpy(int[] dest, int[] src, long count)
      Array version of: nmemcpy(long, long, long)
    • memcpy

      public static long memcpy(int[] dest, int[] src)
    • nmemcpy

      public static long nmemcpy(long[] dest, long[] src, long count)
      Array version of: nmemcpy(long, long, long)
    • memcpy

      public static long memcpy(long[] dest, long[] src)
    • nmemcpy

      public static long nmemcpy(float[] dest, float[] src, long count)
      Array version of: nmemcpy(long, long, long)
    • memcpy

      public static long memcpy(float[] dest, float[] src)
    • nmemcpy

      public static long nmemcpy(double[] dest, double[] src, long count)
      Array version of: nmemcpy(long, long, long)
    • memcpy

      public static long memcpy(double[] dest, double[] src)
    • nmemmove

      public static long nmemmove(byte[] dest, byte[] src, long count)
      Array version of: nmemmove(long, long, long)
    • memmove

      public static long memmove(byte[] dest, byte[] src)
    • nmemmove

      public static long nmemmove(short[] dest, short[] src, long count)
      Array version of: nmemmove(long, long, long)
    • memmove

      public static long memmove(short[] dest, short[] src)
    • nmemmove

      public static long nmemmove(int[] dest, int[] src, long count)
      Array version of: nmemmove(long, long, long)
    • memmove

      public static long memmove(int[] dest, int[] src)
    • nmemmove

      public static long nmemmove(long[] dest, long[] src, long count)
      Array version of: nmemmove(long, long, long)
    • memmove

      public static long memmove(long[] dest, long[] src)
    • nmemmove

      public static long nmemmove(float[] dest, float[] src, long count)
      Array version of: nmemmove(long, long, long)
    • memmove

      public static long memmove(float[] dest, float[] src)
    • nmemmove

      public static long nmemmove(double[] dest, double[] src, long count)
      Array version of: nmemmove(long, long, long)
    • memmove

      public static long memmove(double[] dest, double[] src)
    • memset

      public static <T extends CustomBuffer<T>> long memset(T dest, int c)
      Fills memory with a constant byte.
      Parameters:
      dest - pointer to destination
      c - character to set
      Returns:
      the value of dest
    • memcpy

      public static <T extends CustomBuffer<T>> long memcpy(T dest, T src)
      Copies bytes between memory areas that must not overlap.
      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest
    • memmove

      public static <T extends CustomBuffer<T>> long memmove(T dest, T src)
      Copies count bytes from memory area src to memory area dest.

      The memory areas may overlap: copying takes place as though the bytes in src are first copied into a temporary array that does not overlap src or dest, and the bytes are then copied from the temporary array to dest.

      Parameters:
      dest - pointer to the destination memory area
      src - pointer to the source memory area
      Returns:
      the value of dest