Next: , Previous: , Up: Conversion Functions   [Contents][Index]

15.4.2 stoca

Sometimes we want to store strings in character arrays. The standard function stoca provides the following interface:

fun stoca = (string s, char[] ca, char fill = 0) void: { … }

It fills the given array ca with the contents of the string s. If the string doesn’t fit in the array, then E_out_of_bounds is raised. If the length of the string is less than the length of the array, the extra characters are set to the fill character, which defaults to \0.