string and array oper[]

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/03/2008 at 06:26, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Platform:      
Language(s) :

---------
Iam confused why I am getting strings without the array operator, but when I use the array operator I get ascii.  I tried using tostring in different ways but that didn't do anything for me.

    
    
     pDoc=GetActiveDocument();  
     nObj=pDoc->GetActiveObject();  
     nName=nObj->GetName();  
     len=sizeof(nName);  
     sName=strmid(nName,0,len-2);  
     println(sName);  
     println(nName);  
     nnName=tostring(nName);  
     println(sName[0]);  
     println(nName[2]);  
     println(tostring(sName[0]));

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/03/2008 at 08:48, xxxxxxxx wrote:

Now I'm using

    
    
    inde=strmid(nName,len-1,len-1);

This woks but it would be less typing to be able to use

    
    
    nName[len-1];

and it says in the SDK that this is possible.