Changeset 15152 for trunk/FACT++


Ignore:
Timestamp:
03/25/13 09:54:14 (12 years ago)
Author:
tbretz
Message:
Added desription for String.count
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/scripts/doc/String.js

    r14675 r15152  
    100100 */
    101101String.prototype.$ = function() { /* [native code] */ };
     102
     103/**
     104 * Like String match, but return the number counts how often
     105 * the regular expression matches.
     106 *
     107 * @param {String} regex
     108 *     The regular expression to search for, e.g., "s" (to count the s's) or
     109 *     "As+A" (to count how often s's are surrounded by A's)
     110 *
     111 * @param {Boolean} [case=false]
     112 *     Search is case insensitive if set to true.
     113 *
     114 * @returns {Interger}
     115 *     The number of occurances of the regular expression
     116 *
     117 * @example
     118 *    var result = "Thomas Bretz".count("[hme]"); // returns 3
     119 *
     120 * @author <a href="mailto:thomas.bretz@epfl.ch">Thomas Bretz</a>
     121 */
     122String.prototype.count = function() { /* [native code] */ };
Note: See TracChangeset for help on using the changeset viewer.