Mercurial > urweb
comparison lib/js/urweb.js @ 1624:f96e708b4b93
Client-side strlenGe
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 03 Dec 2011 16:05:06 -0500 |
parents | a20daedfd1d0 |
children | bd34a4af516a |
comparison
equal
deleted
inserted
replaced
1623:218e2a9a53d0 | 1624:f96e708b4b93 |
---|---|
941 return s.substring(r); | 941 return s.substring(r); |
942 } | 942 } |
943 function ssub(s, start, len) { | 943 function ssub(s, start, len) { |
944 return s.substring(start, start+len); | 944 return s.substring(start, start+len); |
945 } | 945 } |
946 function strlenGe(s, len) { | |
947 return s.length >= len; | |
948 } | |
946 | 949 |
947 function trimZeroes(s) { | 950 function trimZeroes(s) { |
948 for (var i = 0; i < s.length; ++i) | 951 for (var i = 0; i < s.length; ++i) |
949 if (s[i] != '0') { | 952 if (s[i] != '0') { |
950 if (i > 0) | 953 if (i > 0) |