Is there a possibilty to easily surround a certain text element in my Android Studio project with quotes?
More specifically without manually typing one quote before and another quote after the text?
For example: some text
should become "some text"
with minimal effort?
All that you need to do is to add “\” in-front of the text and \”” at the end. Example, add double quotes to a String variable in java using escape characters.
Kotlin strings are also immutable in nature means we can not change elements and length of the String. To declare a string in Kotlin, we need to use double quotes(” “), single quotes are not allowed to define Strings.
Android Studio (as well as IntelliJ) provides the functionality of certain Smart Keys, which can be found under
Settings > Editor > General > Smart Keys > Surround selection on typing quote or brace
If enabled and a certain text is highlighted and a quote is typed the previously highlighted text gets surroundes with quotes (single or double quotes work both, as well as any kind of brackets).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With