• Substring accounting for attribute codes

    From Nightfox@VERT/DIGDIST to All on Friday, October 06, 2023 17:49:29
    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 Saturday, October 07, 2023 12:28:39
    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