I see no function to deal with changing individual bu_vls characters.
Have I just missed them or should I just access the bu_vls string
directly?
int main(int ac, char *av[]) {
int i;
struct bu_vls vls = BU_VLS_INIT_ZERO;
bu_vls_printf(&vls, "hello");
for (i=0; i < bu_vls_strlen(&vls); i++) {
printf("The %d char is [%c]\n", i, bu_vls_addr(&vls)[i]);
bu_vls_addr(&vls)[i] += 4;
}
for (i=0; i < bu_vls_strlen(&vls); i++) {
printf("The %d char is [%c]\n", i, bu_vls_addr(&vls)[i]);
}
return 0;
}
Maybe we need a function like bu_vls_readc (for reading) and
bu_vls_exchc (for substituting).
Cheers!
Sean
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
