Created
April 19, 2019 06:31
-
-
Save oilking143/80742c2075aa197cf4244153575b52ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun risedowncount(b: String): Boolean { | |
var baseString:String=b | |
var count:Boolean=true | |
val chary = resources.getStringArray(R.array.charary) | |
for (i in 0 until chary.size) | |
{ | |
if( i<chary.size-2 && baseString.contains(chary.get(i)+chary.get(i+1)+chary.get(i+2)+chary.get(i+3))) | |
{ | |
count=false | |
} | |
} | |
for (i in 0 until chary.size) | |
{ | |
if( i<chary.size-2 && baseString.contains(chary.get(i+3)+chary.get(i+2)+chary.get(i+1)+chary.get(i))) | |
{ | |
count=false | |
} | |
} | |
return count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment