14 lines
383 B
C
14 lines
383 B
C
#include "stringv.h"
|
|
#include <stdio.h>
|
|
int main(void) {
|
|
StringView s1 = sv_from_cstr("Hola mundo con string view");
|
|
StringView s2 = sv_from_cstr("😊");
|
|
StringView last = sv_right(&s1, 4);
|
|
|
|
printf("El string view contiene: %s\n", s2.text);
|
|
printf("El length es: %zu\n", s2.lenght);
|
|
|
|
printf("last tiene:%.*s\n", (int)last.lenght, last.text);
|
|
return 0;
|
|
}
|