mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
CPP/CSharp/Java/Javascript: Use concat in XMLParent.allCharactersString().
This commit is contained in:
@@ -70,9 +70,12 @@ class XMLParent extends @xmlparent {
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: Internal.
|
||||
*
|
||||
* Append the character sequences of this XML parent from left to right, separated by a space,
|
||||
* up to a specified (zero-based) index.
|
||||
*/
|
||||
deprecated
|
||||
string charsSetUpTo(int n) {
|
||||
n = 0 and xmlChars(_,result,this,0,_,_)
|
||||
or
|
||||
@@ -84,10 +87,7 @@ class XMLParent extends @xmlparent {
|
||||
|
||||
/** Append all the character sequences of this XML parent from left to right, separated by a space. */
|
||||
string allCharactersString() {
|
||||
exists(int n | n = this.getNumberOfCharacterSets() |
|
||||
(n = 0 and result = "") or
|
||||
(n > 0 and result = this.charsSetUpTo(n-1))
|
||||
)
|
||||
result = concat(string chars, int pos | xmlChars(_, chars, this, pos, _, _) | chars, " " order by pos)
|
||||
}
|
||||
|
||||
/** Gets the text value contained in this XML parent. */
|
||||
|
||||
Reference in New Issue
Block a user