substringToIndex がエラーになるんだけどどうしてだろ?

var suffixes = "ABCD"
suffixes.substringToIndex(2) // これがエラーになる

"ABCD".substringToIndex(2) // これだとOK "AB"