locked
create custom string with special characters RRS feed

  • Question

  • User-73514677 posted

    Hi.

    I am trying to create a custom string in the format of :

    9~13~""~"¸"

    I tried the below code:

    string sqlfooter = "9~" + rowscount + "~" + '"' + "" + '"' + "~" + '"' + "'\x00b8\'" + '"';

    I am getting output as :

    9~13~""~"'¸'"

    There is an additional ' ' getting added, when compared to the output, which I am expecting.

    How to fix this ?

    Thanks

    Saturday, November 7, 2020 6:07 AM

Answers

  • User303363814 posted

    Do you mean the single quote characters?  If you don't want them then remove them!

    string sqlfooter = "9~" + rowscount + "~" + '"' + "" + '"' + "~" + '"' + "\x00b8" + '"';

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 7, 2020 7:23 AM