Skip to content

Instantly share code, notes, and snippets.

@yenerm
Last active March 18, 2022 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yenerm/b2b98d7a753d1d9cf0819da9bef098cb to your computer and use it in GitHub Desktop.
Save yenerm/b2b98d7a753d1d9cf0819da9bef098cb to your computer and use it in GitHub Desktop.
<!-- Copyright 2019 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
class Person(name: String, var lastname: String) {
var name: String = name
set(value) {
field = value.toLowerCase().capitalize()
updateCount++
}
var updateCount = 0
}
@kosher9
Copy link

kosher9 commented Oct 15, 2020

Hi. I may be wrong but I think it should be :
field =value.toLowerCase().capitalize

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