mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-30 02:50:05 +00:00
Modernised a bunch of code mainly relating to character/string iteration
This commit is contained in:
parent
d346d6ef50
commit
f0ef700e46
27 changed files with 356 additions and 379 deletions
|
|
@ -159,12 +159,12 @@ namespace CodeHelpers
|
|||
StringArray lines;
|
||||
|
||||
{
|
||||
String::CharPointerType t (text.getCharPointer());
|
||||
auto t = text.getCharPointer();
|
||||
bool finished = t.isEmpty();
|
||||
|
||||
while (! finished)
|
||||
{
|
||||
for (String::CharPointerType startOfLine (t);;)
|
||||
for (auto startOfLine = t;;)
|
||||
{
|
||||
switch (t.getAndAdvance())
|
||||
{
|
||||
|
|
@ -437,7 +437,7 @@ namespace CodeHelpers
|
|||
String getLeadingWhitespace (String line)
|
||||
{
|
||||
line = line.removeCharacters ("\r\n");
|
||||
const String::CharPointerType endOfLeadingWS (line.getCharPointer().findEndOfWhitespace());
|
||||
auto endOfLeadingWS = line.getCharPointer().findEndOfWhitespace();
|
||||
return String (line.getCharPointer(), endOfLeadingWS);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue