mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
add getACodepoint to the shared Strings library, and use it in NfaUtils
This commit is contained in:
@@ -63,6 +63,12 @@ string getCodepointAt(string s, int i) {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any unicode character that appears in `s`.
|
||||
*/
|
||||
bindingset[s]
|
||||
string getACodepoint(string s) { result = s.codePointAt(_).toUnicode() }
|
||||
|
||||
/**
|
||||
* Gets the number of unicode codepoints in `s` not counting unpaired surrogates.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user