QUESTION: C string manipulation.
I am making an update to a ESQLC program that is using topend to communicate with Windows..
I have been having a problem separating a string.
I have column on a table that holds the address of a printer in the following format. 184.108.40.206:4000
Its not always guaranteed to be that length.
I pull that list back via FETCh into.... but NOW i want to split it into two different variables. One with the IP and the other with the Port.
so char oIPnPort = "220.127.116.11:5000";
would be split up and copied into two separate variables
char oIP = "111.1223.123.123";
char oPort = "5000";
Could someone give me an example of how to do this via C???
Use of pointers or anything else would be ok... just need help...
This split would remove the : between the port and IP as well... I know I want to copy whats to the right of the : in one variable"port" and whats to the left of the : in IP.
Re: QUESTION: C string manipulation.
|All times are GMT +5.5. The time now is 00:05.|