Altera_Forum
Honored Contributor
8 years agoString operation
I have a string
signal rx_uart_buf : string (0 to 127);
Now I want to test every char value
when ST_PARSE_COM =>
if (idx < RX_BUF_SIZE) then
case character'pos(rx_uart_buf(idx)) is
when 0 => ParseState <= ST_PARSE_IDLE;
when 32 => ParseState <= ST_PARSE_ARG1;
end case;
idx := idx + 1;
end if;
Is it right way to do it?