bridge/class-master/depend/pari/src/language/anal.c
/* return the first n0 chars of s as a GEN [s may not be 0-terminated] */
return the first n0 chars of s as a GEN [s may not be 0-terminated]
return the first n0 chars of s as a GEN [ s may not be 0 - terminated ]
GEN
strntoGENstr(const char *s, long n0)
{
  long n = nchar2nlong(n0+1);
  GEN x = cgetg(n+1, t_STR);
  char *t = GSTR(x);
  x[n] = 0;
  strncpy(t, s, n0); t[n0] = 0; return x;
}
GEN strntoGENstr ( const char * s , long n0 ) { long n = nchar2nlong ( n0 + 1 ) ; GEN x = cgetg ( n + 1 , t_STR ) ; char * t = GSTR ( x ) ; x [ n ] = 0 ; strncpy ( t , s , n0 ) ; t [ n0 ] = 0 ; return x ; }
return the first n0 chars of s as a GEN [s may not be 0-terminated]
return the first n0 chars of s as a GEN [ s may not be 0 - terminated ]