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

    Crazy Strings ! ! !

    SDK Help
    0
    5
    446
    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
      Helper
      last edited by

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

      On 02/12/2003 at 09:32, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi Folks

        
      main(doc,op)  
      {  
          var s = "test";  
          println(s[2]);  
      }  
      

      This example expression returns 115 instead of "s"... what's wrong here?

      Thank you very much!

      Take care,
      Janos

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        On 03/12/2003 at 08:17, xxxxxxxx wrote:

        Isn't a coder out there that knows the answer? I feel that the solution is quite simply...
        I only need the char of a string at a given position. Well, it seemed to me that this had worked with the array-parenthesis - but the code-snippet above prints only 115 instead of the char "s" to the console 😞
        is 115 probably an ascii-code or something like that?

        cu
        qwaak

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          On 03/12/2003 at 08:56, xxxxxxxx wrote:

          Hmm, well, I just saw that the question is quite simply 🙂

          How can I convert a 16 bit unicode char to a string and vice versa?

          I haven't found something in the SDK yet 😕 So I'm looking forward to every hint...

          Best regards from Switzerland
          qwaak

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

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

            On 03/12/2003 at 09:37, xxxxxxxx wrote:

            To convert a character code to a string you have to insert it into a dummy string:

                
                
                var s = "?";  
                s[0] = 115;  
                println(s);
            
            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

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

              On 03/12/2003 at 10:12, xxxxxxxx wrote:

              Hey Mikael,

              ... thank you! 🙂

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