Currently, while there is a function to create the required insert positions for a watermark, there is none to calculate the available insert positions in a text.
Such a function would come in handy, especially when needing to calculate whether or how often a given watermark fits in a given text.
Proposed Solution
Add a function that calculates the available insert positions in a text to the TextWatermarker class. This function could look like this:
/** Counts the available number of insert positions in a [file] */
fun getAvailableInsertPositions(file: TextFile): Int {
return placement(file.content).count()
}
🚀 Feature Request
Current Problem
Currently, while there is a function to create the required insert positions for a watermark, there is none to calculate the available insert positions in a text.
https://github.com/FraunhoferISST/TREND/blob/752be7c96116d2caab58c698b5dc65474a4138e9/watermarker/src/commonMain/kotlin/fileWatermarker/TextWatermarker.kt#L438-L442
Such a function would come in handy, especially when needing to calculate whether or how often a given watermark fits in a given text.
Proposed Solution
Add a function that calculates the available insert positions in a text to the TextWatermarker class. This function could look like this:
Additional Context