Imports System
Public Class Test
Public Shared Function isRotation(s1 As String, s2 As String) As Boolean
return (s1.Length = s2.Length) AND
((s1 + s1).Contains(s2))
End Function
Public Shared Sub Main()
Dim s1 As String = "abbc"
Dim s2 As String = "cabb"
Console.WriteLine(if(isRotation(s1, s2), "yes", "no"))
s1 = "abbc"
s2 = "bbac"
Console.WriteLine(if(isRotation(s1, s2), "yes", "no"))
End Sub
End Class
' run:
'
' yes
' no
'