Appending into string
#7

Have you tried my solution?
pawn Код:
stock AddCommaAfterMonth(DateString[]) {
    new Day, Month[3], Year;
    if(sscanf(DateString, "dsd", Day, Month, Year)) {
        print("Comma could not be added to the Date String (Reason: string not in the right format)");
    }
    else {
        format(DateString, sizeof(DateString), "%d %s, %d", Day, Month, Year);
    }
    return DateString;
}
If we assume your date string is in the variable DateString, you can now just add the comma like this:
pawn Код:
DateString = AddCommaAfterMonth(DateString);
Reply


Messages In This Thread
Appending into string - by Tayab - 25.04.2014, 06:39
Re: Appending into string - by Conradus - 25.04.2014, 07:07
Re: Appending into string - by Tayab - 25.04.2014, 07:21
Re: Appending into string - by Conradus - 25.04.2014, 07:24
Re: Appending into string - by Vince - 25.04.2014, 07:28
Re: Appending into string - by Tayab - 25.04.2014, 07:37
Re: Appending into string - by Conradus - 25.04.2014, 07:45

Forum Jump:


Users browsing this thread: 2 Guest(s)