s****n 发帖数: 700 | 1 char text[64] = "SPY 121231C00095000";
Symbol - 6 bytes
Year - 2 bytes
Month - 2 bytes
Day - 2 bytes
Call/Put Indicator - 1 byte
Strike Dollar - 5 bytes
Strike Decimal - 3 bytes
I want to convert it to the format like "SPY,C,121231,95.0"
The only way I know is to loop the array and set some if statement to get
rid of empty char for Symbol, and get rid of 0 char for strike.
Is there any more efficient way to handle the case. Thank you very much. |
|