def regexFromCodepointSequences()

in src/scala/generator/src/main/scala/EmojiInfoGeneratedView.scala [180:196]


  def regexFromCodepointSequences(codePointSequences: Seq[Seq[Int]]) = {
    val normalizedCodePointSequences = if (isUCS2) {
      codePointSequences.map(codePointSequence => {
        codePointSequence.flatMap {
          case codePoint if codePoint >= 0x10000 && codePoint < 0x110000 =>
            Seq(
              ((codePoint - 0x10000) >> 10) + 0xd800,
              (codePoint & 0x3ff) + 0xdc00
            )
          case codePoint if codePoint < 0x10000 => Seq(codePoint)
          case _ => Nil
        }
      })
    } else codePointSequences

    internalRegexFromCodepointSequences(normalizedCodePointSequences)
  }