Write a Scala program to compare two strings lexicographically. Note: Two strings are lexicographically equal if they are the same length and contain the same characters in the same positions. Sample Solution: Scala Code: object Scala_String { def test(str1: String, str2: String): String = ...
If you work with Java everyday then the problem might be obvious to you, that to compare strings lexicographically you need to use thecompareTomethod on the first string. And since VTL is implemented in Java, that is also the case here. Instead, the right way to do it is this: I hav...