Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    string and array oper[]

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 197 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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]));
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post