Skip to main content
deleted 8 characters in body
Source Link
Gaffi
  • 3.7k
  • 2
  • 23
  • 54

VBA, 121113 characters

Adding my 2 VBA cents...

Function t(s)
k=Right(s,Len(s)-1)
t=Round(Len(k)/2)
If t>0 Then If Left(k,t)=Right<>Right(k,t) Then t=1 Else t=t(k)
End Function

This returns a 1 or 0.

Usage is MsgBox t("abcbcc"), or to get a "True"/"False" outsput, use MsgBox CBool(t("abcbcc"))

VBA, 121 characters

Adding my 2 VBA cents...

Function t(s)
k=Right(s,Len(s)-1)
t=Round(Len(k)/2)
If t>0 Then If Left(k,t)=Right(k,t) Then t=1 Else t=t(k)
End Function

This returns a 1 or 0.

Usage is MsgBox t("abcbcc"), or to get a "True"/"False" outsput, use MsgBox CBool(t("abcbcc"))

VBA, 113 characters

Adding my 2 VBA cents...

Function t(s)
k=Right(s,Len(s)-1)
t=Round(Len(k)/2)
If t>0 Then If Left(k,t)<>Right(k,t) Then t=t(k)
End Function

This returns a 1 or 0.

Usage is MsgBox t("abcbcc"), or to get a "True"/"False" outsput, use MsgBox CBool(t("abcbcc"))

Source Link
Gaffi
  • 3.7k
  • 2
  • 23
  • 54

VBA, 121 characters

Adding my 2 VBA cents...

Function t(s)
k=Right(s,Len(s)-1)
t=Round(Len(k)/2)
If t>0 Then If Left(k,t)=Right(k,t) Then t=1 Else t=t(k)
End Function

This returns a 1 or 0.

Usage is MsgBox t("abcbcc"), or to get a "True"/"False" outsput, use MsgBox CBool(t("abcbcc"))