Read in chunks?

|
Contents:
read in chunks ?
alexmb7 2022-07-30 10:18:52
check
smol_mazunki 2022-07-30 10:18:53
go through each character in the array, check if it’s the same
alexmb7 2022-07-30 10:18:55
ye
smol_mazunki 2022-07-30 10:18:57
but instead
alexmb7 2022-07-30 10:19:17
how do i do inf reading lile awk
alexmb7 2022-07-30 10:19:28
read in chunks ?
smol_mazunki 2022-07-30 10:19:37
alexmb7 2022-07-30 10:19:28
read in chunks ?

that’s not really possible

alexmb7 2022-07-30 10:19:43
read 4k
smol_mazunki 2022-07-30 10:19:54
the only thing C knows about strings is “it starts at this address in memory”
smol_mazunki 2022-07-30 10:20:02
and “if you find a you’re done”
alexmb7 2022-07-30 10:20:11
then assert to saved ( append to ‘saved’ var ) then read next <= 4k
alexmb7 2022-07-30 10:20:30
i need s intact
smol_mazunki 2022-07-30 10:20:31
there are some new modern vector operators which maybe can compare multiple chars at the same time
alexmb7 2022-07-30 10:20:40
thats nice
alexmb7 2022-07-30 10:21:00
smol_mazunki 2022-07-30 10:20:02
and “if you find a you’re done”

i mean

alexmb7 2022-07-30 10:21:16
str = ac
alexmb7 2022-07-30 10:21:24
i need this intact
smol_mazunki 2022-07-30 10:21:25
alexmb7 2022-07-30 10:21:16
str = ac

this is a string of 1 length

alexmb7 2022-07-30 10:21:29
right
alexmb7 2022-07-30 10:21:34
i need self code this
alexmb7 2022-07-30 10:21:37
i mean
alexmb7 2022-07-30 10:21:50
not use the separated pre c shit
smol_mazunki 2022-07-30 10:22:06
alexmb7 2022-07-30 10:21:16
str = ac

i mean char *str = { ‘a’, ”, ‘c’ }; will still contain 3 elements

smol_mazunki 2022-07-30 10:22:19
but if you try to print it you will only see a
alexmb7 2022-07-30 10:22:19
then works
smol_mazunki 2022-07-30 10:22:29
you can str[2] to read the c
alexmb7 2022-07-30 10:22:31
yes need selfcode
alexmb7 2022-07-30 10:22:50
is 0 first element
smol_mazunki 2022-07-30 10:23:16
char str[5];
str[0] = ‘a’;
str[1] = 0;
str[2] = ‘c’;
smol_mazunki 2022-07-30 10:23:21
this is most self-code xD
alexmb7 2022-07-30 10:23:43
i just need
str , the 3 chars , then self made printf to accept this, .. ?
smol_mazunki 2022-07-30 10:23:53
smol_mazunki 2022-07-30 10:23:16
char str[5];
str[0] = ‘a’;
str[1] = 0;
str[2] = ‘c’;

you see how i used = 0 here, that’s because ” is just a 0 number

alexmb7 2022-07-30 10:24:06
ye
alexmb7 2022-07-30 10:25:09
so how would i print this 3 len
alexmb7 2022-07-30 10:25:33
looking for w/o loop to stack the s away
|