|
|
|
|
|
by barsonme
3471 days ago
|
|
I'm not sure I 100% understand your question, but in Go a string is a two-word struct. type string struct {
data unsafe.Pointer
len int
}
The C version would be typedef struct string {
const *char data;
int len;
} string;
Edit: oh, ok. I Googled the "painting algorithm" reference. I swear I had read that before :-) |
|