Changeset 179


Ignore:
Timestamp:
Apr 20, 2011, 12:16:05 AM (9 years ago)
Author:
jmckenna
Message:

add missing function details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/api/zoo-string.txt

    r157 r179  
    3535
    3636startsWith
     37  ::
     38 
     39    startsWith: function(str,sub)
     40
    3741  Test whether a string starts with another string.
    3842
     43  *Parameters*
     44 
     45  | ``str {String}`` The string to test.
     46  | ``sub {Sring}`` The substring to look for.
     47
     48  *Returns*
     49
     50  ``{Boolean}`` The first string starts with the second.
     51 
    3952.. _contains:
    4053
    4154contains       
     55  ::
     56 
     57    contains: function(str,sub)
     58
    4259  Test whether a string contains another string.
    4360
     61  *Parameters*
     62 
     63  | ``str {String}`` The string to test.
     64  | ``sub {String}`` The substring to look for.
     65
     66  *Returns*
     67
     68  ``{Boolean}`` The first string contains the second.
     69 
    4470.. _trim:
    4571
    4672trim   
     73  ::
     74 
     75    trim: function(str)
     76
    4777  Removes leading and trailing whitespace characters from a string.
     78
     79  *Parameters*
     80 
     81  ``str {String}`` The (potentially) space-padded string. This string is not modified.
     82
     83  *Returns*
     84
     85  ``{String}`` A trimmed version of the string with all leading and trailing spaces removed.
    4886
    4987.. _camelize:
    5088
    5189camelize       
    52   Camel-case a hyphenated string.
     90  ::
     91 
     92    camelize: function(str)
     93
     94  Camel-case a hyphenated string. Ex. "chicken-head" becomes "chickenHead", and "-chicken-head" becomes "ChickenHead".
     95
     96  *Parameters*
     97 
     98  ``str {String}`` The string to be camelized.  The original is not modified.
     99
     100  *Returns*
     101
     102  ``{String}`` The string, camelized 
    53103 
    54104.. _tokenRegEx: 
    55105 
    56106tokenRegEx     
    57   Used to find tokens in a string.
     107  Used to find tokens in a string.  Examples: *${a}, ${a.b.c}, ${a-b}, ${5}*
    58108 
    59109.. _numberRegEx:   
     
    65115 
    66116isNumeric       
     117  ::
     118 
     119    isNumeric: function(value)
     120
    67121  Determine whether a string contains only a numeric value.
     122
     123  *Examples*
     124
     125  ::
     126 
     127    ZOO.String.isNumeric("6.02e23") // true
     128    ZOO.String.isNumeric("12 dozen") // false
     129    ZOO.String.isNumeric("4") // true
     130    ZOO.String.isNumeric(" 4 ") // false
     131
     132  *Returns*
     133
     134  ``{Boolean}`` String contains only a number.
    68135 
    69136.. _numericIf: 
    70137
    71138numericIf       
     139  ::
     140 
     141    numericIf: function(value)
     142
    72143  Converts a string that appears to be a numeric value into a number.
     144
     145  *Returns*
     146 
     147  ``{Number|String}`` a Number if the passed value is a number, a String otherwise.
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png