no - as Aharon Robbins pointed out (and X/Open):

substr(s, m[, n  ])
Return the at most n-character substring of s that begins at position m, 
numbering from 1. If n is omitted, or if n specifies more characters than are 
left in the string, the length of the substring shall be limited by the length 
of the string s.

That's undefined behavior.  It would be nice to match behavior in
various aspects which aren't documented, and fall outside the standard.
But that's a wishlist item rather than a bug.

-- 
String indexes are inconsistent with other awks
https://bugs.launchpad.net/bugs/26603
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to