[Development] Recommended way to take in strings
Marc Mutz
marc.mutz at qt.io
Thu Jun 1 07:38:11 CEST 2023
On 31.05.23 16:05, Thiago Macieira wrote:
> [...] Therefore, if
> your function isn't named after a verb in the imperative, then it should be
> const QString &.
Function names have nothing to do with it: `fromString(~~stringish~~)`
is a dead-sure candidate for QAnyStringView while
`operator[](~~stringish~~)` doesn't even have a name as such.
--
Marc Mutz <marc.mutz at qt.io>
Principal Software Engineer
The Qt Company
Erich-Thilo-Str. 10 12489
Berlin, Germany
www.qt.io
Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht Charlottenburg,
HRB 144331 B
More information about the Development
mailing list