[llvm] [llvm] Proofread ProgrammersManual.rst (PR #150787)
Tim Gymnich via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 26 14:52:05 PDT 2025
================
@@ -1908,38 +1908,38 @@ llvm/ADT/StringRef.h
The StringRef class is a simple value class that contains a pointer to a
character and a length, and is quite related to the :ref:`ArrayRef
<dss_arrayref>` class (but specialized for arrays of characters). Because
-StringRef carries a length with it, it safely handles strings with embedded nul
+``StringRef`` carries a length with it, it safely handles strings with embedded nul
characters in it, getting the length does not require a strlen call, and it even
has very convenient APIs for slicing and dicing the character range that it
represents.
-StringRef is ideal for passing simple strings around that are known to be live,
-either because they are C string literals, std::string, a C array, or a
+``StringRef`` is ideal for passing simple strings around that are known to be live,
+either because they are C string literals, ``std::string``, a C array, or a
SmallVector. Each of these cases has an efficient implicit conversion to
StringRef, which doesn't result in a dynamic strlen being executed.
StringRef has a few major limitations which make more powerful string containers
----------------
tgymnich wrote:
```suggestion
``StringRef`` has a few major limitations which make more powerful string containers
```
https://github.com/llvm/llvm-project/pull/150787
More information about the llvm-commits
mailing list