File tree 3 files changed +18
-2
lines changed
3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 22
22
VALIDATE_SCALAFMT : true
23
23
VALIDATE_RUST_2021 : true
24
24
VALIDATE_RUST_CLIPPY : true
25
+ VALIDATE_PYTHON_RUFF : true
25
26
VALIDATE_PYTHON_BLACK : true
26
27
VALIDATE_PYTHON_ISORT : true
27
28
VALIDATE_JAVASCRIPT_ES : true
Original file line number Diff line number Diff line change @@ -4468,8 +4468,8 @@ In order to achieve greater coverage and encourage more people to contribute to
4468
4468
</a>
4469
4469
</td>
4470
4470
<td> <!-- Scala -->
4471
- <a href="./CONTRIBUTING.md ">
4472
- <img align="center" height="25" src="./logos/github .svg" />
4471
+ <a href="./src/scala/Palindrome.scala ">
4472
+ <img align="center" height="25" src="./logos/scala .svg" />
4473
4473
</a>
4474
4474
</td>
4475
4475
<td> <!-- Kotlin -->
Original file line number Diff line number Diff line change
1
+ def isPalindrome (content : String ): Boolean = {
2
+ val sanitizedContent : String = content.replaceAll(" \\ W" , " " ).toLowerCase
3
+ sanitizedContent == sanitizedContent.reverse
4
+ }
5
+
6
+ object Main extends App {
7
+ val data : Seq [String ] = Seq (
8
+ " " ,
9
+ " a" ,
10
+ " abba" ,
11
+ " No lemon, no melon" ,
12
+ " Was it a palindrome?"
13
+ )
14
+ data.foreach(x => println(s " ' $x' is a palindrome? ${isPalindrome(x)}" ))
15
+ }
You can’t perform that action at this time.
0 commit comments