Only alphabetic characters

Report a typo

Create a function that takes a CharSequence as input and returns a boolean value indicating whether the input contains only alphabetic characters.

Sample Input 1:

Hello_world

Sample Output 1:

false

Sample Input 2:

HelloWorld

Sample Output 2:

true
Write a program in Kotlin
fun containsOnlyAlphabets(charSequence: CharSequence): Boolean {
// write your code here
}
___

Create a free account to access the full topic