arduino / arduino/ArduinoCore-API

class String constant opeator [] should return const reference!

Open
#48 5 comments 0 reactions 1 assignee Claimed by @cmaglie View on GitHub
Dominant language
C++
Stars
306
Forks
150
PR merge metrics
No merged PRs in 30d

Description

commonly people want get the buffer ptr by a constant String object like below:
const String &str;
const char *p = &str[0];

BUT now the constant operator [] returns a temp char object, i don't think it is better.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.