• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Save text with line breaks

    How To... ?
    3
    3
    1296
    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.
    • D
      DillTheKraut last edited by Michel

      Maybe someone finds this useful.

      I managed to save larger lines of text in the data array actor, even with line brakes.

      I wrote a very small java script, changing line breaks to some unusual symbols. A second script recovers the breaks from the recalled data.

      This is the 'encryption':

      function main()
      {
      var text = arguments[0];
      var txt = text.replace(/(?:\r\n|\r|\n)/g, '"->"');
      return txt;
      }

      And this the decryption:

      function main()
      {
      var text = arguments[0];
      var txt = text.replace(/"->"/g, '\r\n');
      return txt;
      }

      .

      PS: Writing this lines, it comes to my mind again, that it would be great to have a <code> function for the forum to visually separate java and shader scripts.

      DusX Michel 2 Replies Last reply Reply Quote 2
      • DusX
        DusX Izzy Guru @DillTheKraut last edited by

        @dillthekraut

        Clever solution. I like it.

        🎛️ TroikaTronix Professional Services
        https://troikatronix.com/professional-services

        🎫 Support Tickets
        https://support.troikatronix.com/support/tickets/new

        💻 Add-ons
        https://troikatronix.com/add-ons/?u=dusx

        🧪 GitHub Projects
        https://github.com/rwebber

        🖥️ Win11 | i7 | RTX 4070 | 32GB RAM | Ontario, Canada

        1 Reply Last reply Reply Quote 1
        • Michel
          Michel Izzy Guru @DillTheKraut last edited by

          @dillthekraut

          You do have a <code> function for the forum. 

          Michel Weber | www.filmprojekt.ch | rMBP (2019) i9, 16gig, AMD 5500M 8 GB, OS X 10.15 | located in Winterthur Switzerland.

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