> For the complete documentation index, see [llms.txt](https://blog.bernardw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.bernardw.com/problems/check-rotated-string.md).

# Check Rotated String

{% tabs %}
{% tab title="Scala" %}

```scala
def isRotation(s1: String, s2: String):Boolean = {
  if (s1.length != s2.length) false
  else s1.concat(s1) contains s2
}

isRotation("waterbottle", "erbottlewat")
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}
