mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added a helpful assertion in String::replaceCharacters
This commit is contained in:
parent
9d266d1184
commit
f99b49c999
1 changed files with 4 additions and 0 deletions
|
|
@ -1387,6 +1387,10 @@ String String::replaceCharacter (const juce_wchar charToReplace, const juce_wcha
|
|||
|
||||
String String::replaceCharacters (StringRef charactersToReplace, StringRef charactersToInsertInstead) const
|
||||
{
|
||||
// Each character in the first string must have a matching one in the
|
||||
// second, so the two strings must be the same length.
|
||||
jassert (charactersToReplace.length() == charactersToInsertInstead.length());
|
||||
|
||||
StringCreationHelper builder (text);
|
||||
|
||||
for (;;)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue