• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages

    Upload page content

    You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

    File to load page content from
    Page name
    Comment

    ParseInteger

    See also: Math for information of the "Math" class.

    See also: Strings for information of the "Strings" class.

    usage:

    ParseInteger("numerical String", Minimum value, [optional max value], [optional string end value])

    Returns a number found in a string if the number meets all the criteria (more than or equal to min, less than or equal to max [if specified], and ending in string end value [if specified]). This could be used to extract a number from a string.

    examples:

    echo ParseInteger("40", 50)

    Will return: 40 because it found the number 40 in the string and the number is less than 50.

    echo ParseInteger("40s", 0, 40, "s")

    Will return: 40 because it found a number 40 in the string, the number 40 is more than 0 but less than or equal to 40 and ends in "s".

    echo ParseInteger("50s", 0, 100)

    Will return: -1 because the string is not a number


    CategoryFunctions