There's nothing special about Y=0. The Y can be anywhere outwith the string.
e.g. substr('abc', 6, -4) = 'bc' substr('abc', -5, 3) = 'a' All substr functions should work this way. I wrote a c++ function to emulate it. String substr(const String &Str, int Start, int Len) { if (Str=="" || !Len) return ""; String S; int StrLen = Str.Length(); if (Start < 0) Start = StrLen + Start + 1; if (Len < 0) {Start += Len; Len = -Len;} for (int i = std::max(1, Start); i <= StrLen && i < Start+Len; i++) S += Str[i]; return S; } // String is a windows wide string type // I wrote it a while ago so it could probably be done gooder :-) -- Sent from: http://sqlite.1065341.n5.nabble.com/ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users