doc: Method examples for String

Same here, though this is a bit different.