Skip to content

Instantly share code, notes, and snippets.

@oilking143
Created April 19, 2019 06:31
Show Gist options
  • Save oilking143/80742c2075aa197cf4244153575b52ee to your computer and use it in GitHub Desktop.
Save oilking143/80742c2075aa197cf4244153575b52ee to your computer and use it in GitHub Desktop.
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