Replacement

data class Replacement

Replacements are applied in order, starting with the initial context:
[“this are an red door|”] => [(“are” => “is”, start=5, end=9)
[“this is an red door|”] => [(“an” => “a”, start=8, end=10)
[“this is a red door|”]

Summary

Constructors
Replacement(original: String, replacement: String, start: Int, end: Int)
Properties
String original
The substring in the original text context that will be replaced by replacement in the range from start to end.
String replacement
The string that should replace original as for the replacement.
Int start
The start position in the original text context that is affected by the replacement.
Int end
The end position in the original text context that is affected by the replacement.

Constructors

Replacement

Replacement(original: String, replacement: String, start: Int, end: Int)
Parameters
original: String The substring in the original text context that will be replaced by replacement in the range from start to end.
replacement: String The string that should replace original as for the replacement.
start: Int The string that should replace original as for the replacement.
end: Int The end position in the original text context that is affected by the replacement.

Properties

original

val original: String

The substring in the original text context that will be replaced by replacement in the range from start to end.

replacement

val replacement: String

The string that should replace original as for the replacement.

start

val start: Int

The start position in the original text context that is affected by the replacement.

end

val end: Int

The end position in the original text context that is affected by the replacement.


If something needs to be added or if you find an error in our documentation, please let us know either on our GitHub or Discord.

Last updated on July 29, 2022