luke wrote:

>aaaah. i see. is this another case of 'everything is an object'? i need to
>wrap my head around the all pervasiveness of what that means in the future.
>thanks all.
>  
>
"blah".class     #=> String

 From the command line:
ri String#[]
ri String#concat
ri String#slice!

Generally,
ri String

Devin

>>The most correct way of doing this IMHO is this:
>>
>>str += "..." if str.slice!(200 .. -1)
>>
>>which will cut away everything after the first 200 characters and append
>>a marker if the string was truncated.
>>
>>Your PHP solution would map to this:
>>
>>str = str[0, 200] + "..."
>>    
>>