Facebook's implementation would still be constant time for short strings, because there's a constant which bounds the runtime.
Though I hear that the definition of big-O notation has shifted a bit in Silicon Valley these days so maybe that answer would get me in trouble in an interview.