1
1
mirror of https://github.com/wader/fq.git synced 2024-08-17 16:00:41 +03:00

Merge pull request #933 from wader/native-trim

fq: Use trim from gojq
This commit is contained in:
Mattias Wadman 2024-04-19 18:23:15 +02:00 committed by GitHub
commit 08ced4515f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,8 +5,6 @@ include "decode";
def intdiv(a; b): _intdiv(a; b);
def trim: capture("^\\s*(?<str>.*?)\\s*$"; "m").str;
# does +1 and [:1] as " "*0 is null
def rpad($s; $w): . + ($s * ($w+1-length))[1:];