replaceFirst

@JvmName(name = "replaceFirstByValueByField")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByValueByProperty")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByFieldByValue")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByFieldByField")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByFieldByProperty")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByFieldByResult")
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByPropertyByValue")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByPropertyByField")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByPropertyByProperty")
open fun <Context : Any> Value<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByPropertyByResult")
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: String?): Value<Context, String?>(source)
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: String?, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByResultByField")
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: String?, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstByResultByProperty")
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: String?, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
inline fun <Context : Any> Value<Context, String?>.replaceFirst(find: String?, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByValueByValue")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByValueByField")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByValueByProperty")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByValueByResult")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByFieldByValue")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByFieldByField")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByFieldByProperty")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByFieldByResult")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByPropertyByValue")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByPropertyByField")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByPropertyByProperty")
open fun <Context : Any> Field<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByPropertyByResult")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByResultByValue")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: String?, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByResultByField")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: String?, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByResultByProperty")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: String?, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstFieldReceiverByResultByResult")
inline fun <Context : Any> Field<Context, String?>.replaceFirst(find: String?, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByValueByValue")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByValueByField")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByValueByProperty")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByValueByResult")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Value<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByFieldByValue")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByFieldByField")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByFieldByProperty")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByFieldByResult")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: Field<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByPropertyByValue")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByPropertyByField")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByPropertyByProperty")
open fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByPropertyByResult")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: KProperty1<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByResultByValue")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: String?, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByResultByField")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: String?, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByResultByProperty")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: String?, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstPropertyReceiverByResultByResult")
inline fun <Context : Any> KProperty1<Context, String?>.replaceFirst(find: String?, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByValueByValue")
inline fun <Context : Any> String?.replaceFirst(find: Value<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByValueByField")
inline fun <Context : Any> String?.replaceFirst(find: Value<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByValueByProperty")
inline fun <Context : Any> String?.replaceFirst(find: Value<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByValueByResult")
inline fun <Context : Any> String?.replaceFirst(find: Value<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByFieldByValue")
inline fun <Context : Any> String?.replaceFirst(find: Field<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByFieldByField")
inline fun <Context : Any> String?.replaceFirst(find: Field<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByFieldByProperty")
inline fun <Context : Any> String?.replaceFirst(find: Field<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByFieldByResult")
inline fun <Context : Any> String?.replaceFirst(find: Field<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByPropertyByValue")
inline fun <Context : Any> String?.replaceFirst(find: KProperty1<Context, String?>, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByPropertyByField")
inline fun <Context : Any> String?.replaceFirst(find: KProperty1<Context, String?>, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByPropertyByProperty")
inline fun <Context : Any> String?.replaceFirst(find: KProperty1<Context, String?>, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByPropertyByResult")
inline fun <Context : Any> String?.replaceFirst(find: KProperty1<Context, String?>, replacement: String?): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByResultByValue")
inline fun <Context : Any> String?.replaceFirst(find: String?, replacement: Value<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByResultByField")
inline fun <Context : Any> String?.replaceFirst(find: String?, replacement: Field<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByResultByProperty")
inline fun <Context : Any> String?.replaceFirst(find: String?, replacement: KProperty1<Context, String?>): Value<Context, String?>(source)
@JvmName(name = "replaceFirstResultReceiverByResultByResult")
inline fun String?.replaceFirst(find: String?, replacement: String?): Value<Any, String?>(source)

Replaces the first instance of find with a replacement string.

If no occurrences of find are found in the input string, the input string is returned. If any of the input, find or replacement is null, null is returned.

The input, find, and replacement expressions must evaluate to a string or a null, or $replaceOne fails with an error.

Example

class Document(
val item: String,
)

collection.aggregate()
.set {
Document::item set of(Document::item).replaceFirst(find = of("blue paint"), replacement = of("red paint"))
}.toList()

External resources