M
Michael W. Ryder
Was there a reason the string class was implemented with str
returning the code of position i in str? The reason I ask this is that
in other languages str returns the string starting at position i.
For example C uses t = strcpy(str) and Business Basic uses S$=T$(I)
to copy a string from position i.
I can see no way to do this in Ruby other than using something like: t =
str[i,9999]. It seemed strange that copying ranges of strings uses the
same format as C (t =strncpy(str,n)) but not when copying the remainder.
returning the code of position i in str? The reason I ask this is that
in other languages str returns the string starting at position i.
For example C uses t = strcpy(str) and Business Basic uses S$=T$(I)
to copy a string from position i.
I can see no way to do this in Ruby other than using something like: t =
str[i,9999]. It seemed strange that copying ranges of strings uses the
same format as C (t =strncpy(str,n)) but not when copying the remainder.