• Substring accounting for attribute codes

    From Nightfox@VERT/DIGDIST to All on Fri Oct 6 17:49:29 2023
    Hi all,

    I'm curious if there's a JavaScript function available that will get a substring of a string that accounts for Synchronet attribute codes in the string? Given an index and length, I'm thinking the function would consider the index and length to refer to what would be displayed on the screen, and it would include the appropriate attributes so that the substring would have the same attributes as it does within the source string.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to All on Sat Oct 7 12:28:39 2023
    Re: Substring accounting for attribute codes
    By: Nightfox to All on Fri Oct 06 2023 05:49 pm

    I'm curious if there's a JavaScript function available that will get a substring of a string that accounts for Synchronet attribute codes in the string? Given an index and length, I'm thinking the function would

    I think I've written one that works as expected. I'd written one a while ago, but yesterday I found a case where it wasn't working (longer strings seemed to make it fail, for some reason). I think I've fixed it.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com