FLINT3.7.0-dev

gr_vec_set_str

Synopsis#include <flint/gr_vec.h>
int gr_vec_set_str(gr_vec_t vec, const char * s, int resize, gr_ctx_t ctx)source

Sets vec to the vector described by the string s, of the form [expr1, expr2, ..., exprn] (or []), parsing each entry with gr_set_str over ctx.

Whitespace around the brackets and separators is ignored, and commas inside parentheses, brackets or braces of an entry belong to that entry. If resize is 1, vec is resized to the number of entries; if resize is 0, the function returns GR_DOMAIN when that number differs from the current length of vec. Returns GR_UNABLE if s is not a well-formed list, and propagates any failure from parsing an entry.

Guides#

Cite this page

The FLINT team, “gr_vec_set_str (gr_vec.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_vec/gr_vec_set_str.html (generated 2026-10-20).