Skip to content

Commit

Permalink
Fix memory alloc bug when using trikot-graphql (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdetilly authored Jan 11, 2024
1 parent 0bbbab4 commit 816a7d9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mirego.trikot.graphql

fun String.escapeForGraphql(): String {
return this.fold("") { current, value ->
current + value.escapeForGraphql()
}
return this.fold(StringBuilder()) { builder, value ->
builder.append(value.escapeForGraphql())
}.toString()
}

fun Char.escapeForGraphql(): String {
Expand Down

0 comments on commit 816a7d9

Please sign in to comment.