Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Find and remove the common prefix of security description and trailer, so the trailer only contains meaningful information
- // TODO this is too clever, simplify!
- val secWords = whitespace.split(secDesc).toList.map(Some(_))
- val trailer = trans.getTrailer
- val trailerWords = whitespace.split(trailer).toList.map(Some(_))
- val zipped = secWords.zipAll(trailerWords, None, None)
- val newTrailerWords: List[String] = zipped.dropWhile {
- case (Some(sw), Some(tw)) => sw == tw
- case _ => false
- }.flatMap(_._2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement