Skip to content

Conversation

@GeorgCantor
Copy link

Use of joinToString

Use of joinToString
}
}
private fun cookieHeader(cookies: List<Cookie>): String {
return cookies.joinToString("; ") { "${it.name}=${it.value}" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this creates a nested StringBuilder for each name/value pair before adding it to an enclosing one, whereas the old code only uses a single one for all pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants