All Downloads are FREE. Search and download functionalities are using the official Maven repository.

json_sjs1_2.12.4.0.2.source-code.ToDecimalByte.scala Maven / Gradle / Ivy

The newest version!
package ujson

object MathUtilsByte{
  def toString(bytes: Array[Byte], index: Int, s: String) = {
    val len = s.length
    var i = 0
    while (i < len) {
      bytes(index + i) = s.charAt(i).toByte
      i += 1
    }
    len
  }
}
object DoubleToDecimalByte{
  def toString(bytes: Array[Byte], index: Int, v: Double) = {
    MathUtilsByte.toString(bytes, index, v.toString)

  }
}
object FloatToDecimalByte{
  def toString(bytes: Array[Byte], index: Int, v: Float) = {
    MathUtilsByte.toString(bytes, index, v.toString)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy