mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-11 11:16:40 -05:00
ee85d948e2
GitOrigin-RevId: ef2ef77e26df59d1af3df6dc664e284d3c70102d
13 lines
281 B
JavaScript
13 lines
281 B
JavaScript
/*
|
|
* Misc functions
|
|
*/
|
|
|
|
'use strict'
|
|
|
|
/*
|
|
* return true/false if the given string contains non-BMP chars
|
|
*/
|
|
exports.containsNonBmpChars = function utilContainsNonBmpChars(str) {
|
|
// check for first (high) surrogate in a non-BMP character
|
|
return /[\uD800-\uDBFF]/.test(str)
|
|
}
|