@@ -51,6 +51,14 @@ namespace swift {
51
51
// / Determine the part of speech for the given word.
52
52
PartOfSpeech getPartOfSpeech (StringRef word);
53
53
54
+ // / Scratch space used for returning a set of StringRefs.
55
+ class StringScratchSpace {
56
+ llvm::BumpPtrAllocator Allocator;
57
+
58
+ public:
59
+ StringRef copyString (StringRef string);
60
+ };
61
+
54
62
namespace camel_case {
55
63
class WordIterator ;
56
64
@@ -219,6 +227,16 @@ namespace swift {
219
227
// / unchanged.
220
228
StringRef toLowercaseWord (StringRef string, SmallVectorImpl<char > &scratch);
221
229
230
+ // / Lowercase the first word within the given camelCase string.
231
+ // /
232
+ // / \param string The string to lowercase.
233
+ // / \param scratch Scratch buffer used to form the resulting string.
234
+ // /
235
+ // / \returns the string with the first word lowercased. When the
236
+ // / first word is an acronym, the string will be returned
237
+ // / unchanged.
238
+ StringRef toLowercaseWord (StringRef string, StringScratchSpace &scratch);
239
+
222
240
// / Sentence-case the given camelCase string by turning the first
223
241
// / letter into an uppercase letter.
224
242
// /
@@ -358,14 +376,6 @@ struct OmissionTypeName {
358
376
// / would produce "ByAppendingString".
359
377
StringRef matchLeadingTypeName (StringRef name, OmissionTypeName typeName);
360
378
361
- // / Scratch space used for returning a set of StringRefs.
362
- class StringScratchSpace {
363
- llvm::BumpPtrAllocator Allocator;
364
-
365
- public:
366
- StringRef copyString (StringRef string);
367
- };
368
-
369
379
// / Describes a set of names with an inheritance relationship.
370
380
class InheritedNameSet {
371
381
const InheritedNameSet *Parent;
0 commit comments