newVerbDocs

twitter verbs
  twitter.getHomeTimeline
    Syntax
      twitter.getHomeTimeline ()
    Params
      None.
    Returns
      An array object with the most recent tweets in the user's home timeline.
      The home timeline is the list of tweets that appear on the Home page in the Twitter website.
    Notes
      In the example, we get a value out of the timeline, displaying the whole array of tweets would take a lot of space.
      It will return at most 200 tweets.
    Example
      twitter.getHomeTimeline ().length
        196
      twitter.getHomeTimeline () [0].id
        1373683899830841300
  twitter.getMentionsTimeline
    Syntax
      twitter.getMentionsTimeline ()
    Params
      None.
    Returns
      An array with the most recent tweets that mention the logged-in user.
    Notes
      It will return at most 200 tweets.
    Example
      twitter.getMentionsTimeline ().length
        107
      twitter.getMentionsTimeline () [0].full_text
        @davewiner Too much focus on wall street and war. I was watching this talk just before reading your tweet, this guy gets it, a great speaker too. https://t.co/Nb3LhdIFpM
  twitter.getThread
    Syntax
      twitter.getThread (id)
    Param
      id is a string which is the Twitter-issued identifier for the top tweet in the thread.
    Returns
      An object containing an object with info about the author, and an array with the tweets in the thread.
    Errors
      It's an error if the id is not a valid Twitter-issued identifier.
    Examples
      twitter.getThread ("1371210116473761792").tweets [0]
        { "text": "What is ThreadViewer? \n\nIt's a way to view Twitter threads outside of Twitter.", "id": "1371210116473761792", "when": "Sun, 14 Mar 2021 21:22:22 GMT", "parent": null }
      twitter.getThread ("1371210116473761792").author
        { "name": "dave@scripting.com", "description": "On the net since mid-70s. Started two Silicon Valley companies. Wrote for Wired. Fellow at Harvard, NYU. Founder of podcasting, blogging, RSS. Open web.", "screenname": "davewiner", "when": "Sun, 14 Mar 2021 21:22:22 GMT", "url": "http://scripting.com/", "id": "1371210116473761792" }
  twitter.getTweet
    Syntax
      twitter.getTweet (id)
    Param
      id is a string which is the Twitter-issued identifier for the tweet.
    Action
      Gets all the information about the tweet in a JavaScript object.
    Returns
      An object containing a lot of information about the tweet and its author.
    Errors
      It's an error if the id is not a valid Twitter-issued identifier.
    Notes
      This call does not appear to require authentication.
    Examples
      twitter.getTweet ("1369636870334906368").full_text
        Links don’t work in twitter. Most people don’t click them, too much of a wait, obnoxious ads and subscription pitches, paywalls, article limits. It’s a mess! Meanwhile bloggers with no ads, none of the junk, are caught up in the morass. This has been festering for too long.
      twitter.getTweet ("1369636870334906368").created_at
        Wed Mar 10 13:10:51 +0000 2021
      twitter.getTweet ("1369636870334906368")
        { "created_at": "Wed Mar 10 13:10:51 +0000 2021", "id": 1369636870334906400, "id_str": "1369636870334906368", "full_text": "Links don’t work in twitter. Most people don’t click them, too much of a wait, obnoxious ads and subscription pitches, paywalls, article limits. It’s a mess! Meanwhile bloggers with no ads, none of the junk, are caught up in the morass. This has been festering for too long.", "truncated": false, "display_text_range": [ 0, 274 ], "entities": { "hashtags": [], "symbols": [], "user_mentions": [], "urls": [] }, "source": "Twitter Web App", "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 3839, "id_str": "3839", "name": "dave@scripting.com", "screen_name": "davewiner", "location": "Woodstock, NY", "description": "On the net since mid-70s. Started two Silicon Valley companies. Wrote for Wired. Fellow at Harvard, NYU. Founder of podcasting, blogging, RSS. Open web.", "url": "https://t.co/ztgzDGiyOj", "entities": { "url": { "urls": [ { "url": "https://t.co/ztgzDGiyOj", "expanded_url": "http://scripting.com/", "display_url": "scripting.com", "indices": [ 0, 23 ] } ] }, "description": { "urls": [] } }, "protected": false, "followers_count": 67261, "friends_count": 3842, "listed_count": 5292, "created_at": "Sat Aug 05 23:04:08 +0000 2006", "favourites_count": 17362, "utc_offset": null, "time_zone": null, "geo_enabled": true, "verified": true, "statuses_count": 190364, "lang": null, "contributors_enabled": false, "is_translator": false, "is_translation_enabled": false, "profile_background_color": "9AE4E8", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "profile_background_tile": true, "profile_image_url": "http://pbs.twimg.com/profile_images/1325163719400153089/eW6KCGsY_normal.png", "profile_image_url_https": "https://pbs.twimg.com/profile_images/1325163719400153089/eW6KCGsY_normal.png", "profile_banner_url": "https://pbs.twimg.com/profile_banners/3839/1616275541", "profile_link_color": "7F7F90", "profile_sidebar_border_color": "FFFFFF", "profile_sidebar_fill_color": "E1E1DF", "profile_text_color": "000000", "profile_use_background_image": true, "has_extended_profile": false, "default_profile": false, "default_profile_image": false, "following": false, "follow_request_sent": false, "notifications": false, "translator_type": "none" }, "geo": null, "coordinates": null, "place": null, "contributors": null, "is_quote_status": false, "retweet_count": 4, "favorite_count": 11, "favorited": false, "retweeted": true, "lang": "en" }
  twitter.getUserProfile
    Syntax
      twitter.getUserProfile (string)
    Param
      string is the screenname of the user whose profile you want to get.
    Returns
      An object containing information about the user whose screenname is provided.
    Errors
      The string is not the screenname of an actual Twitter user.
    Examples
      twitter.getUserProfile ("bullmancuso").id
        15252142
      twitter.getUserProfile ("bullmancuso").description
        This aggression will not stand
      twitter.getUserProfile ("bullmancuso").location
        None a you business
  twitter.getUserTimeline
    Syntax
      twitter.getUserTimeline (string, boolean)
    Params
      The string is a screenname for a Twitter user, such as "jack" or "bullmancuso".
      The boolean determines if you want to include replies in the timeline. It's optional, if not specified it defaults to false.
    Returns
      An array with the most recent tweets from the indicated user.
    Notes
      It will return at most 200 tweets.
    Examples
      twitter.getUserTimeline ("jack").length
        148
      twitter.getUserTimeline ("davewiner", false) [18].full_text
        When you post a comment, why not check before hitting the button to see if you said enough for the other person to even guess what you’re saying or asking.
  twitter.newPost
    Syntax
      twitter.newPost (string, id)
    Params
      The string is the body of the tweet to be sent. It is limited to 280 characters.
      Optional: id is the id of the tweet that it's in reply to, if it is a reply. If it is not a reply leave it undefined or 0.
    Returns
      An object with all the info Twitter has about the new tweet. There's a lot of data there. ;-)
    Errors
      It's an error if the body is longer than 280 characters, or if the id is of a tweet that doesn't exist.
    Examples
      twitter.newPost ("I'm having fun writing example code on a Saturday night!").id_str
        1373410165907668994
      twitter.newPost ("A reply to the previous tweet?", "1373410165907668994").id_str
        1373410446536028161
      twitter.newPost (string.randomSnarkySlogan ()).text
        That rug really tied the room together.
dialog verbs
  dialog.alert
    Syntax
      dialog.alert (string)
    Params
      The string is displayed in a dialog with a single button, OK.
    Returns
      The value undefined.
    Example
      dialog.alert ("It's sunny outside.")
        undefined
  dialog.ask
    Syntax
      dialog.ask (prompt, default, placeholder)
    Params
      All parameters are strings.
      prompt is displayed over the text box, it's the question the user is meant to answer.
      default is the initial string in the text box.
      placeholder is a string that appears in the text box when it's empty.
    What it does
      A dialog with a text box and two buttons appears. The buttons are labeled Cancel and OK.
      The user can enter text to replace the default text, and then press Cancel or OK.
      If the user clicks Cancel, dialog.ask returns the value undefined. If the user clicks OK, it returns the string that's in the text box, as modified by the user.
    Returns
      The string the user entered if they pressed OK, or the value undefined if Cancel.
    Example
      dialog.ask ("Favorite color?", "blue", "A color like blue or red goes here.")
        orange
  dialog.confirm
    Syntax
      dialog.confirm (string)
    Params
      The string is displayed in a dialog with two buttons, Cancel and OK.
    Returns
      A boolean, true if the user clicked OK, false if Cancel.
    Example
      dialog.confirm ("Really erase all files on your computer?")
        true
  dialog.about
    Syntax
      dialog.about (string)
    Params
      The string is the web address of an OPML file.
    Returns
      A boolean, true if the user clicked OK, false if Cancel.
    Example
      dialog.about ("http://scripting.com/aboutpage.opml")
        true
date verbs
  date.dayGreaterThanOrEqual
    Syntax
      date.dayGreaterThanOrEqual (d1, d2)
    Params
      Both parameters are JavaScript date objects.
    Returns
      true if the first date is on the same day as the second, or if the first date is later than the second.
    Notes
      This verb is useful in determining which version of software you're running, if you have the publication date of a new version. Also useful to see if a timer has expired.
    Example
      date.dayGreaterThanOrEqual (clock.now (), "November 22, 2018")
        true
  date.netStandardString
    Syntax
      date.netStandardString (date)
    Params
      date is a JavaScript date object.
    Returns
      A RFC 822 version of the date.
    Notes
      This is the format that's required for RSS feeds, OPML files and mail protocols.
      It's a human and machine readable way of expressing of dates.
    Example
      date.netStandardString (clock.now ())
        Sun, 14 Mar 2021 16:28:56 GMT
      date.netStandardString ("12/5/97; 9:03:15 PM")
        Sat, 06 Dec 1997 04:03:15 GMT
  date.sameDay
    Syntax
      date.sameDay (d1, d2)
    Params
      Both parameters are JavaScript date objects.
    Returns
      true if the dates are on the same day, false otherwise.
    Examples
      date.sameDay ("March 12, 2021", "February 12, 2021")
        false
      date.sameDay ("March 12, 2021", "March 12, 2021")
        true
  date.sameMonth
    Syntax
      date.sameMonth (d1, d2)
    Params
      Both parameters are JavaScript date objects.
    Returns
      true if the dates are in the same month, false otherwise.
    Examples
      date.sameMonth ("March 12, 2021", "February 12, 2021")
        false
      date.sameMonth ("March 12, 2021", "March 30, 2021")
        true
  date.secondsSince
    Syntax
      date.secondsSince (date)
    Params
      date is a JavaScript date object.
    Returns
      The number of seconds since the date.
    Notes
      Useful when you want to know how long something took.
    Example
      date.secondsSince ("March 14, 2020")
        31580389.57
  date.tomorrow
    Syntax
      date.tomorrow (date)
    Params
      date is a JavaScript date object.
    Returns
      The result of adding 24 hours from the date.
    Example
      date.tomorrow (clock.now ())
        Mon Mar 15 2021 12:21:22 GMT-0400 (Eastern Daylight Time)
  date.yesterday
    Syntax
      date.yesterday (date)
    Params
      date is a JavaScript date object.
    Returns
      The result of subtracting 24 hours from the date.
    Example
      date.yesterday (clock.now ())
        Sat Mar 13 2021 11:21:02 GMT-0500 (Eastern Standard Time)
file verbs
  file.exists
    Syntax
      file.exists (path)
    Params
      path points to a file in the remote file system.
    Action
      Determines if the file exists
    Returns
      True if it exists, false otherwise
    Examples
      file.exists ("prefs.json")
      file.exists ("meaningOfLife.js")
    Notes
      If you try to read a file that doesn't exist, for example, your script will fail. If your application can work even if a file doesn't exist, then you should use this verb to see if it exists.
  file.writeWholeFile
    Syntax
      file.writeWholeFile (path, text)
    What it does
      Creates a new private file, or overwrites an existing file, at the indicated path, with the contents of the second parameter. It creates any folders needed to store the file if they don't exist.
    Returns
      true.
    Note
      Files are, by default, private. If you want to create a public file, first create the private file then call file.makeFilePublic.
    Examples
      file.writeWholeFile ("hello.txt", "Hello World")
        true
      file.writeWholeFile ("code/alert.js", "dialog.alert ('Yo')")
        true
    Bugs
      None documented.
  file.readWholeFile
    Syntax
      file.readWholeFile (path)
    What it does
      Reads the file at the indicated path and returns its contents as a string.
    Returns
      The contents of the file, as a string.
    Common error
      The file does not exist.
    Example
      file.readWholeFile ("hello.txt") //returns contents of file hello.txt
  file.delete
    Syntax
      file.delete (path)
    What it does
      Tries to delete both a private file or a public one at the indicated path. It's an error if neither file exists.
    Returns
      undefined
    Common error
      The file does not exist.
    Example
      file.writeWholeFile ("deleteme.txt", "It's even worse than it appears.");
      file.delete ("deleteme.txt");
  file.sureFilePath
    Syntax
      file.sureFilePath (path)
    What it does
      Creates any sub-folders needed to be sure you can create the file indicated by path.
      The path is created in the user's private space.
    Returns
      true
    Example
      f = "code/project/app.js"; file.sureFilePath (f); file.writeWholeFile (f, "dialog.alert (\"I am an app.\")")
    Bug
      Not implemented yet.
  file.makeFilePublic
    Syntax
      file.makeFilePublic (path)
    What it does
      Makes the file public if it is private.
    Returns
      The public URL of the file.
    Example
      file.makeFilePublic ("hello2.opml")
  file.getFileHierarchy
    Syntax
      file.getFileHierarchy ()
    What it does
      Returns a JavaScript object that describes the user's file hierarchy.
      There are two top-level branches, Private files and Public files. Unless you have explicitly made a file public, all files are private.
      Under each is the hierarchy, as they are stored in the file system on the server. For each folder there is a whenCreated and a whenModified value, and an object called subs, which contains the files and any sub-folders.
      For each file, in addition to creation and modification dates, ctChars is the size of the file.
    Returns
      A JavaScript object as explained above.
    Notes
      This feature is based on the folderToJson package.
      And the Outline file hierarchy command in the Tools menu is built on file.getFileHierarchy.
    Example
      console.log (jsonStringify (file.getFileHierarchy ()))
http verbs
  http.readUrl
    Syntax
      http.readUrl (url)
    What it does
      Makes and HTTP request.
    Returns
      What the HTTP request returns.
    Errors
      There's a connectivity issue, the server is not accessible.
      The URL is incorrect.
    Example
      console.log (http.readUrl ("http://scripting.com/rss.xml"))
string verbs
  string.addCommas
    Syntax
      string.addCommas (number)
    Params
      The param is a large number that can be made easier to read by adding commas to it.
    Returns
      A string.
    Examples
      string.addCommas (11709445200)
        11,709,445,200
      string.addCommas (12)
        12
      string.addCommas ("abcdefghijklmnopqrstuvwxyz")
        abcdefghijklmnopqrstuvwxyz
  string.addPeriodAtEnd
    Syntax
      string.addPeriodAtEnd (string)
    Params
      string is a sentence that may not have a period at the end.
    Returns
      The string, possibly with a period added at the end.
    Notes
      It's a complicated and somewhat quirky algorithm.
      First we call string.trimWhitespace to remove any spaces or newlines at the beginning and end of the string.
      Then, if the string ends with a period, comma, question mark, quote, colon, semicolon or exclamation point, we do nothing. Putting a period after these characters would usually be incorrect.
      Used in Radio3 to pre-process a linkblog post.
    Examples
      string.addPeriodAtEnd ("I like ice cream")
        I like ice cream.
      string.addPeriodAtEnd ("What is your favorite flavor?")
        What is your favorite flavor?
  string.beginsWith
    Syntax
      string.beginsWith (s, possibleBeginning, flUnicase)
    Params
      The first param is a string that might begin with the second param.
      flUnicase, a boolean, is optional. If true the search is done regardless of the case of the characters. If true the match doesn't have to be exact regarding the case of the characters, so "hooray" will match "Hooray" or "hOOrAy" if flUnicase is true.
    Returns
      true if the string begins with the other, false if it doesn't.
    Example
      string.beginsWith ("hooray for hollywood", "hoo")
        true
  string.bumpUrlString
    Syntax
      string.bumpUrlString (string)
    Params
      string either undefined or the result of having called string.bumpUrlString.
    Returns
      The next string in the sequence, as in a URL shortener application.
    Notes
      The first string it returns is 1, then 2, then it runs through the alphabet. After z it returns 00, then 01.
      It can be used in implementing a URL shortener, to generate a sequence of strings, that can be used as aliases for another perhaps longer string.
    Examples
      string.bumpUrlString (undefined)
        1
      string.bumpUrlString ("z")
        00
      string.bumpUrlString ("zz")
        000
      string.bumpUrlString ("ZZ") //not case-sensitive
        000
  string.contains
    Syntax
      string.contains (s, whatItMightContain, flUnicase) returns boolean
    What it does
      Determines if one string contains another.
      The third parameter, flUnicase, is optional, it defaults to true.
    Returns
      true if the string contains the other, false if it doesn't.
    Example
      dialog.alert (string.contains ("http://november.com", "november")) //displays true
  string.countFields
    Syntax
      string.countFields (s, ch)
    Params
      s is a string, ch is a 1-character string.
    Returns
      The number of fields in the string, with fields determined by the character.
    Examples
      string.countFields ("scripting.com/2003/08/12.html", "/")
        4
      string.countFields ("Do you know the way to San Jose?", " ")
        8
      string.countFields ("Come hear Uncle John's Band.", "/")
        1
    See also
      string.nthField
      string.lastField
  string.dayOfWeekToString
    Syntax
      string.dayOfWeekToString (number)
    Param
      A number between 0 and 6. 0 corresponds to Sunday, 6 to Saturday.
    Returns
      A string like "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" or the empty string.
    Errors
      If the number is out of range it returns the empty string.
    Example
      string.dayOfWeekToString (3)
        Wednesday
    See also
      string.monthToString
  string.decodeXml
    Syntax
      string.bumpUrlString (string)
    Params
      A string that may include encoded XML.
    Returns
      The decoded version of the string.
    Notes
      We look for four strings: &lt; &gt; &amp; and &apos; and convert them to < > & and '.
      At some point it may make sense to look for other strings.
    Examples
      string.decodeXml ("<script>")
        <script>
      string.decodeXml ("Lennon & McCartney")
        Lennon & McCartney
  string.delete
    Syntax
      string.delete (string, index, count)
    Params
      The first parameter is a string that you want to delete characters from.
      The second parameter is the 1-based location of the first character to delete.
      The third parameter is the number of characters to delete.
    Returns
      The result of deleting the characters from the string.
    Notes
      If you try to delete more characters than are present, it deletes as many as it can.
      If you try to delete starting past the end of the string, you end up deleting nothing.
    Example
      string.delete ("123456789", 3, 1)
        12456789
      string.delete ("123456789", 2, 1000)
        1
      string.delete ("123456789", 100, 3)
        123456789
  string.encodeHtml
    Syntax
      string.encodeHtml (string)
    Params
      A string that possibly contains HTML markup.
    Returns
      The result of encoding angle brackets and quotes.
    Notes
      If you try to delete more characters than are present, it deletes as many as it can.
      If you try to delete starting past the end of the string, you end up deleting nothing.
    Examples
      string.encodeHtml ("Still diggin!")
        Still diggin!
      string.encodeHtml ("I love a parade")
        I <b>love</b> a parade
  string.endsWith
    Syntax
      string.endsWith (string1, string2, boolean)
    Params
      The first string is the one we're looking in.
      The second is what we're looking for in the string.
      The boolean says if the search is unicase (it's optional, if not present it's true).
    Returns
      True if the first string ends with the second.
    Examples
      string.endsWith ("Hooray for Hollywood", "wood")
        true
      string.endsWith ("Hooray for Hollywood", "Wood", false)
        false
      string.endsWith ("Hooray for Hollywood", "wheat")
        false
  string.filledString
    Syntax
      string.filledString (character, count)
    Params
      The first parameter is a string which will be replicated.
      The second parameter is the number of times it will be replicated.
    Returns
      A string containing a number of copies of the first parameter.
    Examples
      string.filledString ("p", 10)
        pppppppppp
      string.filledString ("123 ", 10)
        123 123 123 123 123 123 123 123 123 123
      string.filledString ("\t", 3)
  string.formatDate
    Syntax
      string.formatDate (date, format, timezone)
    Params
      The first parameter is a JavaScript date object.
      The second parameter is a string containing a format spec, following strftime standard.
      The third parameter says what timezone you want the date to be in. 0 is GMT, -4 in US/Eastern.
    Returns
      A string, representing the date, in the format specified, in the indicated timezone.
    Notes
      All three parameters are optional.
      If the date is not specified, the current date-time is used.
      If the format is not specified, we use "%c".
      If the timezone is not specified, we use the timezone that the machine that ran the script is in.
    Examples
      string.formatDate (clock.now (), "%B")
        March
      string.formatDate ()
        Sun Mar 14 2021 11:24:53 GMT-0400 (Eastern Daylight Time)
      string.formatDate (clock.now (), "%l:%M %p")
        11:21 AM
      string.formatDate (undefined, "%A, %B %e, %Y at %l:%M %p") + "."
        Sunday, March 14, 2021 at 11:27 AM.
  string.getRandomPassword
    Syntax
      string.getRandomPassword (count)
    Params
      count is the number of characters that will be in the random string that's generated.
    Returns
      A string of random characters.
    Examples
      string.getRandomPassword (20)
        26mxjiulbv2br8jaeutj
      string.getRandomPassword (20)
        pv8snpjvmbl4np4kh4mt
  string.hashMD5
    Syntax
      string.hashMD5 (string)
    Params
      The string is the input to the MD5 encryption algorithm.
    Returns
      The encrypted version of the string.
    Notes
      You can tell with a lot of confidence that the sender who uses this function has a copy of the string without transmitting it.
    Examples
      string.hashMD5 ("Spring forward, fall back.")
        26d37b732af2a3caf47a0b2c9789a0ce
      string.hashMD5 ("It's even worse than it appears")
        d7adfe509535ad6de49a8baf0fbf7a3d
  string.innerCaseName
    Syntax
      string.innerCaseName (string)
    Params
      A string that contains words separated by spaces.
    Returns
      The innerCase version of the string, which means capitalize the first letter after every space, then remove the spaces.
    Notes
      It's useful for creating a file name or URL from a title.
    Examples
      string.innerCaseName ("The story of my life") + ".mp3"
        theStoryOfMyLife.mp3
  string.insert
    Syntax
      string.insert (source, dest, ix)
    Params
      source is a string that will be inserted into dest, also a string, and the 1-based index ix.
    Returns
      The result of the insertion.
    Bugs
      Behavior is unpredictable if ix is less than zero.
    Examples
      string.insert ("Bull ", "My name is Mancuso.", 11)
        My name is Bull Mancuso.
      string.insert ("Hello ", " from Hollywood", 1)
        Hello from Hollywood
  string.isAlpha
    Syntax
      string.isAlpha (ch)
    Params
      ch is a 1-character string.
    Returns
      True if it's an alphabetic character, false otherwise.
      Alphabetic characters are A-Z and a-z.
    Notes
      If the string is longer than one character, it returns true if the first character is alphabetic, false otherwise.
    Examples
      string.isAlpha ("x")
        true
      string.isAlpha ("1")
        false
      string.isAlpha ("#")
        false
      string.isAlpha ("123abc")
        false
    See also
      string.isNumeric
      string.isWhitespace
      string.isPunctuation
  string.isNumeric
    Syntax
      string.isNumeric (ch)
    Params
      ch is a 1-character string.
    Returns
      True if it's a numeric character, false otherwise.
      Numeric characters are 0-9.
    Notes
      If the string is longer than one character, it returns true if the first character is numeric, false otherwise.
    Examples
      string.isNumeric ("4")
        true
      string.isNumeric ("g")
        false
      string.isNumeric ("#")
        false
      string.isNumeric ("123abc")
        true
    See also
      string.isAlpha
      string.isWhitespace
      string.isPunctuation
  string.isPunctuation
    Syntax
      string.isPunctuation (ch)
    Params
      ch is a 1-character string.
    Returns
      True if it's a punctuation character, false otherwise.
      Punctuation characters all characters that are not alpha, numeric or whitespace characters.
    Notes
      If the string is longer than one character, it returns true if the first character is numeric, false otherwise.
      This function can in some cases be used to see if you need to add a period at the end of a sentence.
    Bugs
      Admittedly, its definition is weird, it would probably be better to enumerate the characters that are punctuation, for example, period, comma, colon, semicolon.
    Examples
      string.isPunctuation (" ")
        false
      string.isPunctuation (".")
        true
      string.isPunctuation (",")
        true
    See also
      string.isAlpha
      string.isWhitespace
      string.isNumeric
      string.isPunctuation
      string.trimWhitespace
  string.isWhitespace
    Syntax
      string.isWhitespace (ch)
    Params
      ch is a 1-character string.
    Returns
      True if it's a whitespace character, false otherwise.
      Whitespace characters are " ", "\r", "\n", "\t" (i.e. blank, return, newline and tab).
    Notes
      If the string is longer than one character, it returns true if the first character is numeric, false otherwise.
    Examples
      string.isWhitespace (" ")
        true
      string.isWhitespace ("\n")
        true
      string.isWhitespace ("*")
        false
    See also
      string.isAlpha
      string.isWhitespace
      string.isNumeric
      string.isPunctuation
      string.trimWhitespace
  string.lastField
    Syntax
      string.lastField (s, ch)
    Params
      s is a string, ch is a 1-character string.
    Returns
      A string with the contents of the last specified field in the string, with fields determined by the character.
      If ch doesn't appear in the string, it returns the whole string.
    Bugs
      If ch contains more than one character, the results are not easily specified.
    Examples
      string.lastField ("scripting.com/2003/08/12.html", "/")
        12.html
      string.lastField ("oh the buzzing of the bees", " ")
        bees
      string.lastField ("oh the buzzing of the bees", "123")
        oh the buzzing of the bees
    See also
      string.nthField
      string.countFields
  string.lower
    Syntax
      string.lower (s) returns string
    What it does
      Converts the string to lower case.
    Returns
      The lower case version of the string.
    Example
      dialog.alert (string.lower ("Everyone Do The Hamster Dance!"))
    See also
      string.upper
  string.maxStringLength
    Syntax
      string.maxStringLength (string, maxlength, flWholeWordAtEnd, flAddElipses)
    Params
      The first parameter is a string that you want to be sure isn't longer than the number in the second parameter.
      flWholeWordAtEnd is an optional boolean param. If true, we don't leave a broken word at the end of the string. Defaults to true.
      flAddElipses is an optional boolean. If true, we add three periods at the end of the string. Defaults to true.
    Returns
      A string that is not longer than the indicated length.
    Examples
      string.maxStringLength ("I have a long story I would like to tell you. It begins like this.", 35)
        I have a long story I would like ...
      string.maxStringLength ("You know nothing Jon Snow." , 80)
        You know nothing Jon Snow.
  string.mid
    Syntax
      string.mid (string, ix, ct)
    Params
      The first parameter is a string that you want to get characters from.
      The second parameter is the 1-based location of the first character to copy.
      The third parameter is the number of characters to copy.
    Returns
      The result of extracting the characters from the string.
    Notes
      If you try to delete copy characters than are present, it copies as many as it can.
      If you try to copy starting past the end of the string, you end up copying nothing.
    Example
      string.mid ("123456789", 3, 1)
        3
      string.mid ("123456789", 2, 1000)
        23456789
    See also
      string.delete
      string.insert
  string.monthToString
    Syntax
      string.monthToString (number)
    Param
      A number between 0 and 11. 0 corresponds to January, 11 to December.
    Returns
      A string like "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" or undefined.
    Examples
      string.monthToString (0)
        January
      string.monthToString (100)
        undefined
    See also
      string.dayOfWeekToString
  string.multipleReplaceAll
    Syntax
      string.multipleReplaceAll (s, replaceTable, flCaseSensitive, startCharacters, endCharacters)
    Params
      s is a string.
      replaceTable is an object, where the name of each property is a string to search for, and its value is what you want it replaced with.
      flCaseSensitive, a boolean, determines if the search is case-sensitive. It's optional, if undefined, it defaults to false.
      startCharacters is an optional string, if specified we only look at text within the first string that begins with these characters.
      endCharacters, also optional, if specified, we only look at text within the first string that ends with these characters.
    Returns
      A string, the result of the replacements.
    Example
      string.multipleReplaceAll ("This house costs $293,000.", {"house": "apartment", "293,000": "534,287"})
        This apartment costs $534,287.
    See also
      string.replaceAll
  string.nthField
    Syntax
      string.nthField (s, ch, n)
    Params
      s is a string, ch is a 1-character string, n is a number.
      n is 1-based, i.e. the first field is 1, not 0.
    Returns
      A string with the contents of the specified field, with fields determined by the character.
    Example
      string.nthField ("scripting.com/2003/08/12.html", "/", 3)
        08
    See also
      string.lastField
      string.countFields
  string.padWithZeros
    Syntax
      string.padWithZeros (number, ct)
    Params
      number is a number you want padded with zeros.
      ct is the number of places you want the number padded to.
    Returns
      The padded version of the number as a string.
    Notes
      It's useful if you want all strings produced by the code to be the same length, regardless how large the numbers are.
    Examples
      string.padWithZeros (1200, 5)
        01200
      string.padWithZeros (1, 4) + ".html"
        0001.html
    See also
      string.delete
      string.insert
  string.popExtension
    Syntax
      string.popExtension (s)
    Params
      s is a string.
    Returns
      If the string has an extension, like .txt or .png, we return the string without the extension.
    Example
      string.popExtension ("myAffadavit.txt")
        myAffadavit
    See also
      string.popLastField
      string.popTrailing
  string.popLastField
    Syntax
      string.popLastField (s, ch)
    Params
      s is a string, ch is a 1-character string.
    Returns
      A string without the last field, as determined by the character, used as a delimiter.
    Notes
      Useful if you want to replace the suffix of a file name with another suffix.
    Examples
      string.popLastField ("myDiary.html", ".") + ".json"
        myDiary.json
      string.popLastField ("scripting.com/2021/03/13", "/")
        scripting.com/2021/03
    See also
      string.nthField
      string.countFields
      string.lastField
  string.popTrailing
    Syntax
      string.popTrailing (s, ch)
    Params
      s is a string, ch is a 1-character string.
    Returns
      A string without instances of the character at the end of the string
    Example
      string.popTrailing ("get rid of the dots please.........", ".")
        get rid of the dots please
    See also
      string.popLastField
      string.popExtension
  string.randomSnarkySlogan
    Syntax
      string.randomSnarkySlogan ()
    Params
      None.
    Returns
      A slogan from Dave's collection.
    Notes
      This is mostly for fun. Truthfully it's only for fun. Heh. ;-)
    Examples
      string.randomSnarkySlogan ()
        People return to places that send them away.
      string.randomSnarkySlogan ()
        This aggression will not stand.
      string.randomSnarkySlogan ()
        All of this has happened before and all of this will happen again.
      string.randomSnarkySlogan ()
        It's even worse than it appears.
  string.replaceAll
    Syntax
      string.replaceAll (s, searchFor, replaceWith)
    Params
      All three parameters are strings.
    Returns
      The result of replacing all occurrences of the second string with the third, in the first.
    Example
      string.replaceAll ("raise your hand if you're happy", " ", "---")
        raise---your---hand---if---you're---happy
    See also
      string.multipleReplaceAll
  string.stripMarkup
    Syntax
      string.stripMarkup (string)
    Params
      A string that might contain HTML markup.
    Returns
      The string without the HTML markup.
    Example
      string.stripMarkup ("Sometimes you don't want the markup.")
        Sometimes you don't want the markup.
  string.trimLeading
    Syntax
      string.trimLeading (string, ch)
    Params
      First parameter is a string, the second parameter is a 1-character string.
    Returns
      The string without instances of the character at the beginning of the string.
    Example
      string.trimLeading ("$$$$$We don't need the dollar signs at the beginning of this string.", "$")
        We don't need the dollar signs at the beginning of this string.
    See also
      string.trimTrailing
  string.trimTrailing
    Syntax
      string.trimTrailing (string, ch)
    Params
      First parameter is a string, the second parameter is a 1-character string.
    Returns
      The string without instances of the character at the end of the string.
    Example
      string.trimTrailing ("We don't need the question marks at the end of this string.?????", "?")
        We don't need the question marks at the end of this string.
    See also
      string.trimLeading
  string.trimWhitespace
    Syntax
      string.trimWhitespace (string)
    Params
      A string that might have whitespace at the beginning and/or end.
    Returns
      The string without whitespace characters at the beginning and end.
    Notes
      Use this verb to allow comparisons between names or identifiers that might have whitespace around them.
    Example
      string.trimWhitespace (" All the whitespace is a problem. ")
        All the whitespace is a problem.
      string.trimWhitespace (" Alice ") == "Alice"
        true
    See also
      string.trimLeading
  string.upper
    Syntax
      string.upper (s) returns string
    What it does
      Converts the string to upper case.
    Returns
      The upper case version of the string.
    Example
      dialog.alert (string.upper ("It's even worse than it appears."))
    See also
      string.lower
dns verbs
  dns.getDomainName
    Syntax
      dns.getDomainName (dottedid)
    Returns
      The domain name associated with the dotted id. This is often referred to as "reverse DNS."
    Common error
      There is no domain associated with the provided dotted id.
    Example
      dns.getDomainName ("52.217.74.35")
        s3-website-us-east-1.amazonaws.com
    Limits
      It only returns one domain name, but there might be more than one domain mapped to a given IP address.
  dns.getDottedId
    Syntax
      dns.getDottedId (name)
    Returns
      Return the dotted id associated with the name. This is often referred to as "DNS lookup."
    Common error
      The domain is not defined.
    Bug
      When there's an error, the error message is undefined.
    Example
      dns.getDottedId ("scripting.com")
        52.217.103.83
      dns.getDottedId ("feedbase.io")
        157.230.11.43
      dns.getDottedId ("asdfasdf.wtf")
        208.113.174.22
clock verbs
  clock.now
    Syntax
      clock.now ()
    Returns
      A JavaScript date object with the current date and time.
    Example
      clock.now ()
        Tue Mar 16 2021 14:31:39 GMT-0400 (Eastern Daylight Time)
  clock.waitSeconds
    Syntax
      clock.waitSeconds (count)
    Returns
      The number of seconds it waited.
    Example
      clock.waitSeconds (1)
        1.003
speaker verbs
  speaker.beep
    Syntax
      speaker.beep ()
    What it does
      Makes a standard beep sound on the computer's speaker.
    Notes
      It's useful for confirming an operation was done, or otherwise to attract the user's attention.
    Returns
      undefined
    Example
      speaker.beep () === undefined
        true
tab verbs
  tab.getPublicUrl
    Syntax
      tab.getPublicUrl () returns string
    What it does
      If the outline in the current tab in the outliner is public, returns the HTTP address of the file.
      If the outline is private, returns undefined.
    Returns
      A web address or undefined.
    Example
      dialog.alert (tab.getPublicUrl ())
        undefined