GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BREAKLINE(3) Schily´s LIBRARY FUNCTIONS BREAKLINE(3)

breakline() - breaks a buffer into fields

int breakline(buf, delim, array, max)
char *buf;
char delim;
char *array[];
int max;

breakline() breaks the buffer buf into fields delimited by the character delim, replacing the occurrences of delim in buf with the NULL character ('\0'). It fills in the array with pointers to the beginning of each field in the buffer. max defines how many entries to fill in the array. If there are not enough fields in buf, the extra entries in the array will point to an empty string.

Returns the number of fields actually in the buffer, but not more than max.

char *buf = "a:bc:d:efg";
char *array[10];
breakline(buf, ':', array, 10);
now the `:' are replaced by '\0' and:
	array[0] = "a";
	array[1] = "bc";
	array[2] = "d"
	array[3] = "efg";
	array[4] ... array[9] = "";

findline(3)

none
2020/02/09 Joerg Schilling

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.