String 有没有更好的方法在PARI/gp中获取子字符串?

String 有没有更好的方法在PARI/gp中获取子字符串?,string,pari-gp,String,Pari Gp,问题:有没有更好的方法(内置函数?)在PARI/gp中获取子字符串 ? substr(s,n,m)=concat(Vec(s)[n..n+m-1]) %1 = (s,n,m)->concat(Vec(s)[n..n+m-1]) ? s="h0getcwdfailedNosuchfileordirectory" %2 = "h0getcwdfailedNosuchfileordirectory" ? substr(s,4,8) %3 = "e

问题:有没有更好的方法(内置函数?)在PARI/gp中获取子字符串

? substr(s,n,m)=concat(Vec(s)[n..n+m-1])
%1 = (s,n,m)->concat(Vec(s)[n..n+m-1])
? s="h0getcwdfailedNosuchfileordirectory"
%2 = "h0getcwdfailedNosuchfileordirectory"
? substr(s,4,8)
%3 = "etcwdfai"