mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
Added method XmlElement::isValidXmlName() and implemented standard-compliant checking for XML name validity
This commit is contained in:
parent
7ca51f0a7d
commit
705e7f6110
3 changed files with 65 additions and 22 deletions
|
|
@ -1066,7 +1066,12 @@ public:
|
|||
for (int i = 1 + r.nextInt (numElementsInArray (buffer) - 2); --i >= 0;)
|
||||
buffer[i] = chars [r.nextInt (sizeof (chars) - 1)];
|
||||
|
||||
return CharPointer_ASCII (buffer);
|
||||
String result (buffer);
|
||||
|
||||
if (! XmlElement::isValidXmlName (result))
|
||||
result = createRandomIdentifier (r);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static String createRandomWideCharString (Random& r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue