Skip to content

Commit a8bbbfd

Browse files
author
alessandro_gsantos
committed
Added comments
1 parent 11ee209 commit a8bbbfd

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/kotlin/other/Palindrome.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ package other
33
import java.text.Normalizer
44
import java.util.regex.Pattern
55

6-
6+
/**
7+
* A palindrome is a word, number, phrase, or other sequence
8+
* of characters which reads the same backward as forward,
9+
* such as madam, racecar. There are also numeric palindromes,
10+
* particularly date/time stamps using short digits 11/11/11 11:11
11+
* and long digits 02/02/2020
12+
*
13+
* This function
14+
* @param text The text to be checked if it is a palindrome
15+
* @return return true if the text is a Palindrome
16+
*/
717
fun isPalindrome(text: String): Boolean {
818

919
val normalizedText = text.normalize()

0 commit comments

Comments
 (0)