[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 235 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
trimValForByteLength( safeVal, newVal, byteLimit, fn ) X-Ref |
Utility function to trim down a string, based on byteLimit and given a safe start position. It supports insertion anywhere in the string, so "foo" to "fobaro" if limit is 4 will result in "fobo", not "foba". Basically emulating the native maxlength by reconstructing where the insertion occurred. param: {string} safeVal Known value that was previously returned by this param: {string} newVal New value that may have to be trimmed down. param: {number} byteLimit Number of bytes the value may be in size. param: {Function} [fn] See jQuery.byteLimit. return: {Object} return: {string} return.newVal return: {boolean} return.trimmed |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |