lua backend: string index and basic functions.