Global market prices leading ","

Discussion in 'Bug Reports' started by t31os, May 29, 2021.

  1. t31os

    t31os Berserker

    Joined:
    Nov 15, 2017
    Messages:
    112
    Likes Received:
    59
    Trophy Points:
    28
    Global market items prices have a leading comma if they are 3, 6 or 9 numbers long (any multiple of 3 i think).

    jZ1x9Nt.jpg

    This is quite outside my wheelhouse, but i'm guessing you need a number formatting function call there.

    Code:
    value.ToString("n0", new CultureInfo("en-US"));
    
    or
    
    String.Format(new CultureInfo("en-US"), "n0", value);
    ....depending on whether the stored value is an integer or string.

    Where value is your stored number, presumably you could also pass in the language to (so the value is delimited according the user's locale).
     
    InnerpeacE and PF2K like this.
  2. Loading...


  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice