Last active
March 18, 2022 22:37
-
-
Save yenerm/b2b98d7a753d1d9cf0819da9bef098cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I may be wrong but I think it should be :
field =value.toLowerCase().capitalize