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

pl.touk.nussknacker.engine.util.CaretPosition2d.scala Maven / Gradle / Ivy

The newest version!
package pl.touk.nussknacker.engine.util

import io.circe.generic.JsonCodec

@JsonCodec
final case class CaretPosition2d(row: Int, column: Int) {

  def normalizedCaretPosition(inputValue: String): Int = {
    inputValue.split("\n").take(row).map(_.length).sum + row + column
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy