Docs
ServoyCloudSupportSamplesOpen SourceCommunity
  • Home
  • GUIDES
    • Platform Overview
    • Get Servoy
    • Get Started
      • Chapter 0
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
      • Chapter 5
    • Get Help
      • SuLA Instructions
      • SuLA Terms
    • Develop
      • Application Design
        • Forms
          • Layout Management
            • Simple Layout
            • Fully Responsive
              • Bootstrap 12-Grid
              • Flexbox
              • Custom Div
              • Collapsible Container
              • Simple Collapsible
              • Center Container
              • Inline Group Container
            • Abstract Form
          • Form Containers
            • Form Container
            • Tab Panel
            • Split Pane
            • Collapse
            • Accordion Panel
            • Form Component
            • List Form Component
          • Form Inheritance
          • Form Components
        • UI Components
          • Buttons and Text
            • Badge
            • Button
            • Data Label
            • Dropdown
            • Image
            • Label
          • Grids
            • Data Grid
            • Power Grid
            • Table
          • Input Controls
            • Calendar
            • Calendar Inline
            • Checkbox
            • Choice Group
            • Combobox
            • Group Buttons
            • Html Area
            • Input Group
            • Rating
            • Slider
            • Switch
            • Spinner
            • TextArea
            • Textbox
            • TextBoxGroup
            • Type Ahead
            • select2tokenizer
          • Media
            • Carousel
            • Embedded YouTube
            • File upload
            • Image label
            • Lightbox Gallery
            • MultiFile Upload
            • PDF JS Viewer
            • PDF Viewer
          • Mobile
            • Native Data List
            • Native Select
          • Navigation
            • Breadcrumbs
            • Navbar
            • sidenav
          • Visualization
            • DBTreeview
            • Progress Bar
            • Treeview
            • ChartJS
              • Data Labels Plugin
              • Funnel Chart
              • OutLabels Plugin
              • TreeMap
          • Specialized Components
            • Smart Document Editor
            • Servoy PDF Viewer
            • Fullcalendar Component
              • Fullcalendar
              • Fullcalendar Events
              • Migrating calendar from Smart and Web client to NG client
            • Fullcalendar Component 2
            • Canvas
            • Google Charts
            • Google Maps
            • svySignature
            • svywebcam
        • Styling and Themes
          • Default Theme Properties
          • CSS / LESS
          • Component Variants
          • Font Icons
        • Data Modeling
          • Databases
            • Tables
              • Columns
              • Calculations
              • Aggregations
              • Methods
              • Events / Triggers
              • Table security
            • Views
            • Procedures
          • Relations
          • Value Lists
          • Menus
          • In-Memory Databases
          • View Datasource
        • Modular Design
      • Programming Guide
        • Scripting the UI
          • Scripting Forms
          • Interacting with Components
          • Navigation
          • Windows, Dialogs and Popups
          • Events Manager
        • Working with Data
          • Concepts
          • Loading
          • Sorting
          • Iterating
          • Searching
            • Find mode
            • Query Builder
            • SQL String
          • Filtering
          • Editing
          • Validation
        • Automation and Scheduling
          • Batch Processor
          • Headless API
          • Scheduler API
        • Creating REST APIs
        • Consuming Webservices
        • Working with Files
          • File Plugin Basics
          • Images
          • Excel
          • PDF
          • JSON
        • Browser Utilities
          • Notifications
            • Web Notifications (Toastr)
            • Web Notifications (Native)
            • Block UI
          • Session Management
          • Keyboard Utilities
          • NG Utils
        • Sending and Receiving Email
        • Servoy Jasper Reports
          • Input Type
          • Display Mode
          • Output format
          • Jaspe Reports Viewer
        • Extensions
          • Modules
            • svyPhonegap
              • First Use Guide
              • Barcode Scanner
              • Browser
              • Camera
              • File
              • Fingerprint
              • Location
              • Network Interface
              • Phonegap
              • Printer
              • Push Notifications
            • svyAPI
              • Getting Started
            • svyLookup
              • Custom Templates
              • API Documentation
              • svyLookup v1
                • API Documentation v1.0.0
                • Base Form svyLookupTable v1.0.0
                • Base Form AbstractLookup v1.0.0
            • svyNavigation
              • API Documentation
                • API svyNavigation
                • API svyNavigationHistory
                • API svyNavigationUX
            • svyPopupFilter
              • Simple Filter Pickers
              • Custom Templates
              • API Documentation
                • API svyToolbarFilter
                • API svyPopupFilter
              • API Documentation v1
                • API svyToolbarFilter v1
                • API svyPopupFilter v1
            • svySearch
            • svySecurity
              • Overview
              • Token-based Auth and SSO (NEW!)
              • API Documentation
              • Getting Started
              • Tenant replication
              • Security Management Console
                • Classic Security Management Console
              • svySecurityUX
              • svyProperties
              • API Doc svyProperties
            • svyUtils
              • Log Manager
              • Log Manager Appenders
              • Smart Doc Editor Utils
              • Custom Dialogs
              • Excel Utils
                • Full API Reference
              • Crypto Utils
      • Security
        • Authentication
        • Permissions
          • UI Permissions
          • Data Permissions
          • Runtime Permissions
        • Audit Logging
        • OAuth
        • JWT
      • Multi-Language Support
      • Mobile Development
        • Getting Started
        • Mobile Design
        • Native Mobile Integrations
        • Building a Native Binary for the App Store
      • Native Desktop Development
        • NGDesktop UI plugin
        • NGDesktop Utils
        • NGDesktop File Plugin
    • Deploy
      • WAR Deployment
      • Docker Deployment
      • Server Configuration
        • Server Settings
        • Server Plugins
        • Database Servers
          • Locks
          • Transactions
          • Oracle
          • SQLServer
        • Client Sessions
        • Batch Processors
        • License Management
        • Monitoring
          • Server Log
          • Browser Console Log
          • Websocket Log
          • Query Performance
          • Client Performance
          • Client Event Tracing
          • Monitoring Servoy with JMX
      • NGClient deployment
      • Troubleshooting
      • Other Topics
        • Security: Cross-site Scripting
        • Running in an iFrame
    • Extend
    • Contribute
  • Reference
    • Servoy Core
      • Object Model
        • Database Server
          • Table
            • Column
            • Calculation
            • Method
            • Aggregation
          • View
          • Procedure
        • Solution
          • Form
          • Form Component
          • Relation
          • Relation Item
          • Table Node
          • Value List
          • Menu
          • Menu item
          • In-Memory Data Source
          • View Foundset Data Source
          • Variable
          • Column Info
          • Media
          • Layout Container
          • Method
        • i18n Message Key
      • Developer API
        • Globals
        • Forms
          • RuntimeForm
            • controller
            • containers
              • RuntimeContainer
            • elements
              • Component
              • RuntimeAccordionPanel
              • RuntimeBean
              • RuntimeButton
              • RuntimeCalendar
              • RuntimeCheck
              • RuntimeCombobox
              • RuntimeComponent
              • RuntimeDataButton
              • RuntimeDataLabel
              • RuntimeGroup
              • RuntimeHtmlArea
              • RuntimeImageMedia
              • RuntimeInsetList
              • RuntimeLabel
              • RuntimeListBox
              • RuntimePassword
              • RuntimePortal
              • RuntimeRadio
              • RuntimeChecks
              • RuntimeRadios
              • RuntimeRectangle
              • RuntimeRtfArea
              • RuntimeSpinner
              • RuntimeSplitPane
              • RuntimeTabPanel
              • RuntimeTextArea
              • RuntimeTextField
              • RuntimeWebComponent
        • JS Lib
          • Array
          • BigInt
          • Boolean
          • Date
          • Function
          • IterableValue
          • Iterator
          • JSON
          • Map
          • Set
          • Math
          • Namespace
          • Number
          • Object
          • Promise
          • QName
          • RegExp
          • Special Operators
          • Statements
          • String
          • XML
          • XMLList
        • Application
          • APPLICATION_TYPES
          • CLIENTDESIGN
          • DRAGNDROP
          • ELEMENT_TYPES
          • LOGGINGLEVEL
          • NGCONSTANTS
          • UICONSTANTS
          • CSSPosition
          • JSDimension
          • JSDNDEvent
          • JSEvent
          • JSLogger
          • JSLogBuilder
          • JSPoint
          • JSUpload
          • JSWindow
          • JSBounds
          • Renderable
          • UUID
        • SolutionModel
          • ALIGNMENT
          • ANCHOR
          • BEVELTYPE
          • CURSOR
          • DEFAULTS
          • FONTSTYLE
          • MEDIAOPTION
          • PAGEORIENTATION
          • PRINTSLIDING
          • SCROLLBAR
          • TITLEJUSTIFICATION
          • TITLEPOSITION
          • UNITS
          • JSBean
          • JSButton
          • JSCalculation
          • JSComponent
          • JSDataSourceNode
          • JSField
          • JSForm
          • JSLabel
          • JSMedia
          • JSMethod
          • JSPart
          • JSPortal
          • JSRelation
          • JSRelationItem
          • JSStyle
          • JSTab
          • JSTabPanel
          • JSValueList
          • JSVariable
          • JSTitle
          • JSChecks
          • JSCombobox
          • JSHeader
          • JSInsetList
          • JSList
          • JSPassword
          • JSRadios
          • JSText
          • JSTextArea
          • JSWebComponent
          • JSLayoutContainer
        • Database Manager
          • QUERY_COLUMN_TYPES
          • SQL_ACTION_TYPES
          • JSColumn
          • JSDataSet
          • JSBaseRecord
          • JSBaseSqlRecord
          • JSBaseFoundset
          • JSBaseSQLFoundset
          • JSFoundSet
          • JSFoundSetUpdater
          • JSRecord
          • JSRecordMarker
          • JSRecordMarkers
          • JSTable
          • JSTableFilter
          • MenuFoundSet
          • MenuItemRecord
          • QBAggregate
          • QBAggregates
          • QBCase
          • QBCaseWhen
          • QBColumn
          • QBColumns
          • QBCondition
          • QBFunction
          • QBFunctions
          • QBGroupBy
          • QBJoin
          • QBJoins
          • QBLogicalCondition
          • QBParameter
          • QBParameters
          • QBPart
          • QBResult
          • QBSearchedCaseExpression
          • QBSelect
          • QBSort
          • QBSorts
          • QBTableClause
          • QBWhereCondition
          • ViewFoundSet
          • ViewRecord
        • Events Manager
          • EVENTS_AGGREGATION_TYPES
          • EventType
        • Menus
          • JSMenu
          • JSMenuItem
        • JSMenuDatasource
        • Utils
        • Client Utils
          • JSBlobLoaderBuilder
        • History
        • Security
        • i18n
        • ServoyException
          • DataException
        • JSUnit
        • Datasources
          • DBDataSource
          • DBDataSourceServer
          • JSConnectionDefinition
          • JSDataSource
          • MemDataSource
          • MenuDataSource
          • SPDataSource
          • SPDataSourceServer
          • ViewDataSource
        • JSViewDatasource
        • servoyDeveloper
        • enum
    • Extensions
      • UI Components
        • Buttons and Text
          • Badge
          • Button
          • Data Label
          • Drop Down
          • Image
          • Label
        • Form Containers
          • Accordion Panel
          • Collapse
          • Form Container
          • Form Component Container
          • List Form Component
          • Default Loading Indicator
          • Error Bean
          • Portal
          • Responsive Container
          • Servoy Default Navigator
          • Slider
          • Split Pane
          • TabPanel
        • Grids
          • Data Grid
          • Power Grid
          • Table
        • Input Controls
          • Calendar
          • Calendar Inline
          • Checkbox
          • Choice Group
          • Combobox
          • Floatinglabel Calendar
          • Floatinglabel Combobox
          • Floatinglabel Textarea
          • Floatinglabel Textbox
          • Floatinglabel Type Ahead
          • Group Buttons
          • Html Area
          • Input Group
          • Rating
          • Select2tokenizer
          • Slider
          • Spinner
          • Switch
          • TextArea
          • TextBox
          • TextBox Group
          • Type Ahead
        • Media
          • Carousel
          • Embedded YouTube
          • File upload
          • Image label
          • Lightbox Gallery
          • MultiFile Upload
          • PDF JS Viewer
          • PDF Viewer
        • Mobile
          • Native Data List
          • Native Select
        • Navigation
          • Breadcrumbs
          • Navbar
          • sidenav
        • SmartDocEditor
          • Smart Document Editor
        • Visualization
          • Canvas
          • Chart
          • Custom List
          • DBTreeview
          • Foundset List
          • Fullcalendar
          • Gauge
          • Google Maps
          • Kanban
          • Progress Bar
          • Treeview
      • Server Plugins
        • amortization
          • AmortizationCalculation
          • Polynomial
        • clientmanager
          • Broadcaster
          • JSClientInformation (cm)
        • excelxport
        • file
          • JSFile
          • JSProgressMonitor
        • headlessclient
          • JSClient
        • http
          • HTTP_STATUS
          • Cookie
          • DeleteRequest
          • GetRequest
          • HeadRequest
          • HttpClient
          • HttpClientConfig
          • OptionsRequest
          • PostRequest
          • PutRequest
          • Response
          • TraceRequest
          • PatchRequest
          • JSFileUpload
        • images
          • JSImage
        • jwt
          • Algorithm
          • Builder
          • JWTClaims
        • mail
          • Attachment
          • MailMessage
        • maintenance
          • JSClientInformation
          • JSColumnObject
          • JSServer
          • JSTableObject
        • mobileservice
          • OfflineDataDescription
        • oauth
          • ClientAuthentication
          • CustomApiBuilder
          • OAuthProviders
          • OAuthRequest
          • OAuthResponse
          • OAuthResponseBinary
          • OAuthResponseJSON
          • OAuthResponseText
          • OAuthService
          • OAuthServiceBuilder
          • OAuthTokenExtractors
          • RequestType
        • pdf_output
        • rawSQL
        • RestWs plugin
        • rest_ws
          • WsContents
          • WsCookie
          • WsRequest
          • WsResponse
        • scheduler
        • serialize
        • textxport
          • DataProviderExport
          • TabExporter
        • udp
          • JSPacket
        • XmlReader
          • XmlNode
      • Browser Plugins
        • Block UI
        • Block UI (ref)
        • Dialogs Plugin
        • Idle
        • Idle (ref)
        • Key Listener
        • Key Listener (ref)
        • NGDesktop File
        • NGDesktop File (ref)
        • NGDesktop UI (ref)
        • NGDesktop Utils (ref)
        • NG Utils (ref)
        • Office Javascript API for Servoy
        • Phonegap
        • Web Notifications (Native)
        • Web Notifications (Toastr)
        • Window Plugin
        • Font Awesome
      • Modules
        • Smart Doc Editor Utils
        • svyAPI
          • Getting Started
        • svyLookup
          • Custom Templates
          • API Documentation
          • svyLookup v1
            • API Documentation v1.0.0
            • Base Form svyLookupTable v1.0.0
            • Base Form AbstractLookup v1.0.0
        • svyLookupExample
        • svyNavigation
          • API Documentation
            • API svyNavigation
            • API svyNavigationHistory
            • API svyNavigationUX
        • svyNavigationUX
        • svyNavigationUXSample
        • svyPopupFilter
          • Simple Filter Pickers
          • Custom Templates
          • API Documentation
            • API svyToolbarFilter
            • API svyPopupFilter
          • API Documentation v1
            • API svyToolbarFilter v1
            • API svyPopupFilter v1
        • svyProperties
        • svySearch
        • svySecurity
          • Overview
          • Token-based Auth and SSO (NEW!)
          • API Documentation
          • Getting Started
          • Tenant replication
          • Security Management Console
            • Classic Security Management Console
          • svySecurityUX
          • svyProperties
          • API Doc svyProperties
        • svySecurityConsole
        • svySecurityUX
        • svyUtils
          • Log Manager
          • Log Manager Appenders
          • Smart Doc Editor Utils
          • Custom Dialogs
          • Excel Utils
          • Full API Reference
          • Crypto Utils
        • svyUtils$Excel
        • svyUtils$NGClient
        • svyUtils$customDialogs
        • svyUtils$logManagerAppenders
        • svyUtils$tableGrid
      • Layout
        • Boostrap 12grid layout
          • Collapsible Container
          • Simple Collapsible
          • Center Container
          • Inline Group Container
          • Flexbox Layout
      • Solutions
        • Sample Application
          • Tutorial Part 1
          • Tutorial Part 2
      • Packages
        • UI Component Packages
          • Advanced Renderers
          • Bootstrap Components
          • Bootstrap Extra Components
          • Canvas
          • Chart JS
          • Fullcalendar Component
          • googlemaps
          • kanban
          • Servoy Core
          • Servoy Extra Components
          • Servoy NG-Grids
          • Servoy PDF Viewer
          • smartDocumentEditor
        • Browser Plugin Packages
          • Block UI
          • Core NG only Services
          • Key Listener
          • NGDesktop File
          • NGDesktop UI
          • NGDesktop Utils
          • Web Notifications
          • Idle Web Service
    • Servoy Developer
      • Menu
        • File
        • Edit
        • Source
        • Refactor
        • Navigate
        • Search
        • Project
        • Actions
        • Run
        • Window
        • Help
      • Toolbar
      • Solution Explorer
        • Resources
          • Database Servers
            • Database Server
              • Procedures
              • Tables
              • Views
          • Security
          • i18n
        • All Solutions
          • Solution
          • Active Solution
            • Scopes
              • Scope
                • Variables
            • Forms
              • Working Set
              • Form
                • Controller
                • Variables
                • Elements
                • Relations
            • Form Components
              • Form Component
            • Relations
              • Relation
            • ValueLists
              • ValueList
            • Menus
              • Menu
                • MenuItem
            • Media
              • Folder
              • File
            • DataSources
              • In Memory DataSources
                • In Memory DataSource
              • View Foundsets DataSources
                • View Foundset DataSources
            • Servoy Packages
              • Package
            • Modules
              • Module
        • Solution Explorer Contextual List
      • Views
        • Command Console
        • Console
        • Problems
        • Tasks
        • Bookmarks
        • Search
        • Form Hierarchy
        • Help
        • JUnit
        • Outline
        • Profiler
        • Properties
        • Project Explorer
        • Call Hierarchy
      • Editors and Wizards
        • Property configurator for columns
        • Relation Editor
        • Text Format Editor
        • Date Format Editor
        • Number Format Editor
        • Database Synchronization Wizard
        • Security Editor
        • SQL Editor
        • i18n Editor
        • File Import Wizard
        • File Export Wizard
        • WAR Export Wizard
        • NGDesktop Export Wizard
        • Table Editor
        • Metadata Synchronization Wizard
        • Database Server Connection Editor
        • Text Property Editor
        • Valuelist Editor
        • Form Editor
          • Parts of the Form Editor
          • Designing a Form
          • Layout Tools
          • Using Containers
          • Creating and Using Forms
          • Using Servoy Beans
          • Using Shapes
          • Form Editor Subtabs
          • [Tips and Shortcuts][reference/servoy-developer/object-editors/form-editor-tips_and_shortcuts.md]
          • Editong a Responsive LayoutForm
          • CSS Positioning
        • Form Hierarchy
        • Component Properties Editor
        • Variable Editor
        • Method Selection Wizard
        • New Solution Wizard
        • Application Event Types Editor
        • New Form Wizard
        • Form Dataproviders Configurator
        • Servoy Resource Locator
        • Datasource Selection Wizard
        • Sorting Fields Wizard
        • Scripting Editor
          • Getting Started-Overview of Script Editor
          • Code Writing Features
          • Code Navigation
          • Code Rewriting Tools
          • Refactoring
          • Code Formatting
          • Script Editor Tips and Shortcuts
          • Unit Tests
        • Theme Editor
          • General Properties
          • Sidenav Properties
          • Navbar Properties
          • Tabs Properties
          • Windows Properties
          • Dialogs Properties
          • Tables Properties
          • Breadcrumb specific style Properties
          • Brand colors Properties
          • Validations Properties
          • Margins and Padding Properties
        • Editor Selection
        • Run Configurations
        • Debug Configurations
        • Externalize Strings Wizard
        • Font Chooser Wizard
        • Color Chooser Wizard
        • Project Properties Configurator
        • Move Wizard
        • External Tools Configurations
        • About Servoy Developer
        • Servoy Developer Installation Details
        • Eclipse Marketplace Wizard
        • Install Available Software Wizard
        • Cheat Sheet Selection Wizard
        • Servoy Developer Help Wizard
        • Switch to Editor Wizard
        • Find Actions Wizard
        • Customize Perspective Configurator
        • Quick Search Wizard
        • Search Wizard
        • Encoding Wizard
        • Task Wizard
        • Find - Replace Wizard
        • Properties Editor
        • New Project Wizard
        • New Method Wizard
        • New Menu Wizard
          • New MenuItem Wizard
        • Menu Editor
        • ServoyMenu Selection Wizard
        • JSMenu compatible component selector
        • Permissions Configuration Dialog
      • Project File Structure
        • Servoy Installation Directory
          • servoy.properties
        • Workspace Folder
          • Resources Directory
            • Database Information (.dbi) Files
          • Solution Folder
      • Package Manager
      • Preferences
      • Property Types for components / services
      • Debugger
        • Debug Explorer
        • Breakpoints
          • Breakpoint Properties
        • Variables
        • Expressions
        • Interactive Console
    • Application Server
    • Servoy Cloud
      • Cloud Control Center
        • Home
          • Setup Namespace
          • User profile
            • My Profile
            • Support
        • Download IDE
        • Application Overview
          • Applications
            • Pipelines
              • Jobs
                • Packages
                  • Commits
                  • Artifacts
                  • Configuration
                  • Quality reports
                  • Build markers
                • Job Configuration
                  • Build and Deploy or Build
                  • Mobile
                  • Desktop
            • Environments
              • Metrics
                • Users
                • Databases
                  • Metrics
                • System Health
                • Log Activity
                • App performance
                • Query performance
              • Cloud reporting
            • Security
              • Permissions
              • Tenants
            • Reports
            • Security Login Designer
              • Single Sign-On
                • Sign in with Google
                • Sign in with Microsoft
          • Code Repositories
        • Project Management
          • Tickets
          • Backlog
          • Active Sprints
        • User Management
          • Users
          • Roles
        • Administration
          • Security
            • ServoyCloud Roles
          • Credentials
          • Settings
        • Add-Ons
      • Database Backup
      • E2E Cypress Testing
        • Using Cypress
      • On-Premise Deployment
      • Privacy policy (ServoyAI)
      • FAQ
      • Migrate to Servoy Cloud
    • Extensions Developement
      • Component and Services
        • Component Development
        • Service Development
        • Tools and Dev Tips to use for Component/Service developement
        • Manifest (.mf file)
        • Specification (.spec file)
          • Property Types
            • Array property types
            • Custom object property types
            • Findmode property type
            • Foundset property type
            • Tags
        • Directives And Filters
          • Sablotabsequence
        • Console (serverside)
        • ServoyApi (serverside)
      • Serverside Plugins
        • Data Convertors and Validators
        • UI Convertors
  • Release notes
    • Release notes
      • 2025.03
      • 2024.03 (LTS)
      • 2023.03 (LTS)
      • 2025.03 (Servoy Cloud)
      • 2024.12
      • 2024.12 (Servoy Cloud)
      • 2024.09
      • 2024.09 (Servoy Cloud)
      • 2024.06
      • 2024.06 (Servoy Cloud)
      • 2024.03 (Servoy Cloud)
      • 2023.12
      • 2023.12 (Servoy Cloud)
      • 2023.09
      • 2023.09 (Servoy Cloud)
      • 2023.06
      • 2022.03 (LTS)
      • 2022.12 What's new
      • 2022.12
      • 2022.09 What's new
      • 2022.09
      • 2022.06 What's new
      • 2022.06
      • 2021.03.3 (LTS)
Powered by GitBook
On this page
  • Overview
  • Properties Summarized
  • Methods Summarized
  • Properties Detailed
  • length
  • Methods Detailed
  • anchor(nameAttribute)
  • big()
  • blink()
  • bold()
  • charAt(index)
  • charCodeAt(index)
  • codePointAt(index)
  • concat(string2)
  • concat(string2, stringN)
  • endsWith(searchString)
  • endsWith(searchString, length)
  • equals(other)
  • equalsIgnoreCase(other)
  • fixed()
  • fontcolor(color)
  • fontsize(size)
  • fromCharCode(num)
  • fromCodePoint(num)
  • includes()
  • indexOf(searchValue, fromIndex)
  • italics()
  • lastIndexOf(searchValue, fromIndex)
  • link(hrefAttribute)
  • localeCompare(otherString)
  • match(regexp)
  • normalize()
  • normalize(form)
  • padEnd(targetLength)
  • padEnd(targetLength, padString)
  • padStart(targetLength)
  • padStart(targetLength, padString)
  • repeat(count)
  • replace(regexp, function)
  • replace(regexp, newSubStr)
  • replace(substr, function)
  • replace(substr, newSubStr)
  • search(regexp)
  • slice(beginSlice)
  • slice(beginSlice, endSlice)
  • small()
  • split(separator, limit)
  • split(separator, limit)
  • startsWith(searchString)
  • startsWith(searchString, position)
  • strike()
  • sub()
  • substr(start)
  • substr(start, length)
  • substring(indexA)
  • substring(indexA, indexB)
  • sup()
  • toLocaleLowerCase()
  • toLocaleUpperCase()
  • toLowerCase()
  • toUpperCase()
  • trim()
  • trimEnd()
  • trimStart()

Was this helpful?

  1. Reference
  2. Servoy Core
  3. Developer API
  4. JS Lib

String

PreviousStatementsNextXML

Last updated 5 months ago

Was this helpful?

Overview

The String object is used to represent and manipulate a sequence of characters.

For more information see: .

Properties Summarized

Type
Name
Summary

Gives the length of the string.

Methods Summarized

Type
Name
Summary

returns a copy of the string embedded within an anchor <A> tag set.

returns a copy of the string embedded within an <BIG> tag set.

returns a copy of the string embedded within an <BLINK> tag set.

returns a copy of the string embedded within an <B> tag set.

returns a character of the string.

returns a decimal code of the char in the string.

returns a non-negative integer that is the Unicode code point value at the given position.

returns a string that appends the parameter string to the string.

returns a string that appends the parameter string to the string.

Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.

Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.

returns a boolean that checks if the given string is equal to the string

returns a boolean that checks if the given string is equal to the string ignoring case

returns a copy of the string embedded within an anchor <TT> tag set.

returns a copy of the string embedded within an <FONT> tag set, the color param is assigned the the color attribute.

returns a copy of the string embedded within an <FONT> tag set, The size param is set to the SIZE attribute

Static method that returns a string created from the specified sequence of UTF-16 code units.

Static method that returns a string created by using the specified sequence of code points.

Determines whether one string may be found within another string.

returns the found index of the given string in string.

returns a copy of the string embedded within an <I> tag set

returns the found index of the given string in string from the end.

returns a copy of the string embedded within an <A> tag set.

returns an array of strings within the current string that matches the regexp.

Returns the Unicode Normalization Form of the string.

Returns the Unicode Normalization Form of the string.

The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length.

The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length.

The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length.

The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length.

Constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.

returns a new string where the matches of the given regexp are replaced by the return value of the function.

returns a new string where the matches of the given reg exp are replaced by newSubStr.

returns a new string where the first match of the given substr is replaced by the return value of the function.

returns a new string where the first match of the given substr is replaced by newSubStr.

returns an index where the first match is found of the regexp

returns a substring of the string.

returns a substring of the string.

returns a copy of the string embedded within an <SMALL> tag set.

returns an array of objects whose elements are segments of the current string.

returns an array of objects whose elements are segments of the current string.

Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.

Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.

returns a copy of the string embedded within an <STRIKE> tag set.

returns a copy of the string embedded within an <SUB> tag set.

returns a substring of the string from the start with the number of chars specified.

returns a substring of the string from the start with the number of chars specified.

Returns a substring of the string from the start index until the end index.

Returns a substring of the string from the start index until the end index.

returns a copy of the string embedded within an <SUP> tag set.

returns a string with all lowercase letters of the current string.

returns a string with all uppercase letters of the current string.

Returns the string stripped of whitespace from both ends.

Removes whitespace from the ending of a string and returns a new string, without modifying the original string.

Removes whitespace from the beginning of a string and returns a new string, without modifying the original string.

Properties Detailed

length

Gives the length of the string.

Sample

string.length;

Methods Detailed

anchor(nameAttribute)

returns a copy of the string embedded within an anchor <A> tag set.

Parameters

Sample

string.anchor();

big()

returns a copy of the string embedded within an <BIG> tag set.

Sample

string.big();

blink()

returns a copy of the string embedded within an <BLINK> tag set.

Sample

string.blink();

bold()

returns a copy of the string embedded within an <B> tag set.

Sample

string.bold();

charAt(index)

returns a character of the string.

Parameters

Sample

string.charAt(integer_position);

charCodeAt(index)

returns a decimal code of the char in the string.

Parameters

Sample

string.charCodeAt(integer_position);

codePointAt(index)

returns a non-negative integer that is the Unicode code point value at the given position. Note that this function does not give the nth code point in a string, but the code point starting at the specified string index.

Parameters

Sample

string.codePointAt(integer_position);

concat(string2)

returns a string that appends the parameter string to the string.

Parameters

Sample

string.concat(string);

concat(string2, stringN)

returns a string that appends the parameter string to the string.

Parameters

Sample

string.concat(string);

endsWith(searchString)

Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.

Parameters

Sample

var str1 = 'Cats are the best!';
 application.output(str1.endsWith('best', 17));

endsWith(searchString, length)

Determines whether a string ends with the characters of a specified string, returning true or false as appropriate.

Parameters

Sample

var str1 = 'Cats are the best!';
 application.output(str1.endsWith('best', 17));

equals(other)

returns a boolean that checks if the given string is equal to the string

Parameters

Sample

string.equals(string);

equalsIgnoreCase(other)

returns a boolean that checks if the given string is equal to the string ignoring case

Parameters

Sample

string.equalsIgnoreCase(string);

fixed()

returns a copy of the string embedded within an anchor <TT> tag set.

Sample

string.fixed();

fontcolor(color)

returns a copy of the string embedded within an <FONT> tag set, the color param is assigned the the color attribute.

Parameters

Sample

string.fontcolor(color);

fontsize(size)

returns a copy of the string embedded within an <FONT> tag set, The size param is set to the SIZE attribute

Parameters

Sample

string.fontsize(size);

fromCharCode(num)

Static method that returns a string created from the specified sequence of UTF-16 code units.

Parameters

Sample

String.fromCharCode(0x2014); // returns "—"
String.fromCharCode(65, 66, 67); // returns "ABC"

fromCodePoint(num)

Static method that returns a string created by using the specified sequence of code points. String.fromCharCode() cannot return supplementary characters (i.e. code points 0x010000 – 0x10FFFF) by specifying their code point. Instead, it requires the UTF-16 surrogate pair for that. String.fromCodePoint(), on the other hand, can return 4-byte supplementary characters, as well as the more common 2-byte BMP characters, by specifying their code point (which is equivalent to the UTF-32 code unit).

RangeError is thrown if an invalid Unicode code point is given (e.g. "RangeError: NaN is not a valid code point").

Parameters

Sample

String.fromCodePoint(42); // "*"
String.fromCodePoint(65, 90); // "AZ"
String.fromCodePoint(0x2f804); // "\uD87E\uDC04"
String.fromCodePoint(-1); // RangeError
String.fromCodePoint(3.14); // RangeError

includes()

Determines whether one string may be found within another string.

Sample

string.includes('foo');

indexOf(searchValue, fromIndex)

returns the found index of the given string in string.

Parameters

Sample

string.indexOf(string,startPosition);

italics()

returns a copy of the string embedded within an <I> tag set

Sample

string.italics();

lastIndexOf(searchValue, fromIndex)

returns the found index of the given string in string from the end.

Parameters

Sample

string.lastIndexOf(string,startPosition);

link(hrefAttribute)

returns a copy of the string embedded within an <A> tag set.

Parameters

Sample

string.link(url);

localeCompare(otherString)

Parameters

Sample

var s = "Have a nice day!";
application.output(s.localeCompare("Hello"));

match(regexp)

returns an array of strings within the current string that matches the regexp.

Parameters

Sample

string.match(regexpr);

normalize()

Returns the Unicode Normalization Form of the string. (defaults to "NFC" form)

normalize(form)

Returns the Unicode Normalization Form of the string. form param can be one of "NFC", "NFD", "NFKC", or "NFKD", specifying the Unicode Normalization Form. If omitted or undefined, "NFC" is used.

These values have the following meanings:

"NFC" Canonical Decomposition, followed by Canonical Composition. "NFD" Canonical Decomposition. "NFKC" Compatibility Decomposition, followed by Canonical Composition. "NFKD" Compatibility Decomposition.

Parameters

Sample

var string1 = '\u00F1';           // �
var string2 = '\u006E\u0303';     // �

string1 = string1.normalize('NFD');
string2 = string2.normalize('NFD');

application.output(string1 === string2); // true
application.output(string1.length);      // 2
application.output(string2.length);      // 2

padEnd(targetLength)

The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string. The default value used for padding is the unicode "space" character (U+0020) - if no padString argument is used.

Parameters

Sample

string.padEnd(10, '*');

padEnd(targetLength, padString)

The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string.

Parameters

Sample

string.padEnd(10, '*');

padStart(targetLength)

The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string. The default value used for padding is the unicode "space" character (U+0020) - if no padString argument is used.

Parameters

Sample

string.padStart(10);

padStart(targetLength, padString)

The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length. The padding is applied from the start of the current string.

Parameters

Sample

string.padStart(10, '*');

repeat(count)

Constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.

Parameters

Sample

var str = 'abc'.repeat(2); // 'abcabc'

replace(regexp, function)

returns a new string where the matches of the given regexp are replaced by the return value of the function. The function parameter is the function to be invoked to create the new substring (to put in place of the substring received from parameter #1).

Parameters

Sample

//the callback definition
function replacer(match, p1, p2, p3, offset, string){
		// match is the matched substring
		// p1 is non-digits, p2 digits, and p3 non-alphanumerics
		// offset is the offset of the matched substring within the total string being examined
		// string is the total string being examined
 	return [p1, p2, p3].join(' - ');
}
// using replace method with replacer callback
newString = "abc12345#$*%".replace(/([^\d]*)(\d*)([^\w]*)/, replacer);

replace(regexp, newSubStr)

returns a new string where the matches of the given reg exp are replaced by newSubStr.

Parameters

Sample

string.replace(regexp,newSubStr);
//var re = /(\w+)\s(\w+)/;
//var str = "John Smith";
//var newstr = str.replace(re, "$2, $1");
//application.output(newstr);

replace(substr, function)

returns a new string where the first match of the given substr is replaced by the return value of the function. The function parameter is the function to be invoked to create the new substring (to put in place of the substring received from parameter #1).

Parameters

Sample

// the callback definition
function replacer(match){
		return match.toUpperCase()
}
// using replace method with replacer callback
var newString = "abc".replace("a", replacer);

replace(substr, newSubStr)

returns a new string where the first match of the given substr is replaced by newSubStr.

Parameters

Sample

string.replace(substr,newSubStr);

search(regexp)

returns an index where the first match is found of the regexp

Parameters

Sample

string.search(regexpr);

slice(beginSlice)

returns a substring of the string.

Parameters

Sample

string.slice(start,end);

slice(beginSlice, endSlice)

returns a substring of the string.

Parameters

Sample

string.slice(start,end);

small()

returns a copy of the string embedded within an <SMALL> tag set.

Sample

string.small();

split(separator, limit)

returns an array of objects whose elements are segments of the current string.

Parameters

Sample

var myString = 'Hello 1 word. Sentence number 2.';
var splits = myString.split(new RegExp(/(\d)/), 2);
application.output(splits); //prints [Hello , 1]

split(separator, limit)

returns an array of objects whose elements are segments of the current string.

Parameters

Sample

var myString = 'Hello 1 word. Sentence number 2.';
var splits = myString.split(' ');
application.output(splits);

startsWith(searchString)

Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.

Parameters

Sample

var str1 = 'Cats are the best!';
 application.output(str1.startsWith('Cats'));

startsWith(searchString, position)

Determines whether a string begins with the characters of a specified string, returning true or false as appropriate.

Parameters

Sample

var str1 = 'Cats are the best!';
 application.output(str1.startsWith('Cats'));

strike()

returns a copy of the string embedded within an <STRIKE> tag set.

Sample

string.strike();

sub()

returns a copy of the string embedded within an <SUB> tag set.

Sample

string.sub();

substr(start)

returns a substring of the string from the start with the number of chars specified.

Parameters

Sample

string.substr(start, number_of_chars);

substr(start, length)

returns a substring of the string from the start with the number of chars specified.

Parameters

Sample

string.substr(start, number_of_chars);

substring(indexA)

Returns a substring of the string from the start index until the end index.

Parameters

Sample

string.substring(start, end);

substring(indexA, indexB)

Returns a substring of the string from the start index until the end index.

Parameters

Sample

string.substring(start, end);

sup()

returns a copy of the string embedded within an <SUP> tag set.

Sample

string.sup();

toLocaleLowerCase()

Sample

var s = "Have a nice day!";
application.output(s.toLocaleLowerCase());

toLocaleUpperCase()

Sample

var s = "Have a nice day!";
application.output(s.toLocaleUpperCase());

toLowerCase()

returns a string with all lowercase letters of the current string.

Sample

string.toLowerCase();

toUpperCase()

returns a string with all uppercase letters of the current string.

Sample

string.toUpperCase();

trim()

Returns the string stripped of whitespace from both ends.

Sample

string.trim();

trimEnd()

Removes whitespace from the ending of a string and returns a new string, without modifying the original string.

Sample

string.trimEnd();

trimStart()

Removes whitespace from the beginning of a string and returns a new string, without modifying the original string.

Sample

string.trimStart();

Type

nameAttribute ;

Returns:

Returns:

Returns:

Returns:

index ;

Returns:

index ;

Returns:

index ;

Returns:

string2 ;

Returns:

string2 ;

stringN ;

Returns:

searchString The characters to be searched for at the end of str.

Returns: true if the given characters are found at the end of the string; otherwise, false

searchString The characters to be searched for at the end of str.

length If provided, it is used as the length of str. Defaults to str.length.

Returns: true if the given characters are found at the end of the string; otherwise, false

other ;

Returns:

other ;

Returns:

Returns:

color ;

Returns:

size ;

Returns:

num A sequence of numbers that are UTF-16 code units. The range is between 0 and 65535 (0xFFFF). Numbers greater than 0xFFFF are truncated. No validity checks are performed.

Returns: A string of length N consisting of the N specified UTF-16 code units.

num A sequence of code points.

Returns: A string created by using the specified sequence of code points.

Returns:

searchValue ;

fromIndex ;

Returns:

Returns:

searchValue ;

fromIndex ;

Returns:

hrefAttribute ;

Returns:

otherString ;

Returns:

regexp ;

Returns:

Returns: A string containing the Unicode Normalization Form of the given string.

form param can be one of "NFC", "NFD", "NFKC", or "NFKD",

Returns: A string containing the Unicode Normalization Form of the given string.

targetLength The length of the resulting string once the current str has been padded. If the value is less than or equal to str.length, then str is returned as-is.

Returns: A String of the specified targetLength with spaces applied at the end of the current str.

targetLength The length of the resulting string once the current str has been padded. If the value is less than or equal to str.length, then str is returned as-is.

padString The string to pad the current str with. If padString is too long to stay within the targetLength, it will be truncated from the end. The default value is the unicode "space" character (U+0020).

Returns: A String of the specified targetLength with the padString applied at the end of the current str.

targetLength The length of the resulting string once the current str has been padded. If the value is less than or equal to str.length, then str is returned as-is.

Returns: A String of the specified targetLength with spaces applied from the start.

targetLength The length of the resulting string once the current str has been padded. If the value is less than or equal to str.length, then str is returned as-is.

padString The string to pad the current str with. If padString is too long to stay within the targetLength, it will be truncated from the end. The default value is the unicode "space" character (U+0020).

Returns: A String of the specified targetLength with padString applied from the start.

count An integer between 0 and +Infinity, indicating the number of times to repeat the string.

Returns: A new string containing the specified number of copies of the given string.

regexp ;

function ;

Returns:

regexp ;

newSubStr ;

Returns:

substr ;

function ;

Returns:

substr ;

newSubStr ;

Returns:

regexp ;

Returns:

beginSlice ;

Returns:

beginSlice ;

endSlice ;

Returns:

Returns:

separator Specifies the string which denotes the points at which each split should occur. If separator is an empty string, str is converted to an array of characters.

limit Optional integer specifying a limit on the number of splits to be found.

Returns:

separator Specifies the string which denotes the points at which each split should occur. If separator is an empty string, str is converted to an array of characters.

limit Optional integer specifying a limit on the number of splits to be found.

Returns:

searchString The characters to be searched for at the start of this string.

Returns: true if the given characters are found at the beginning of the string; otherwise, false

searchString The characters to be searched for at the start of this string.

position The position in this string at which to begin searching for searchString. Defaults to 0.

Returns: true if the given characters are found at the beginning of the string; otherwise, false

Returns:

Returns:

start ;

Returns:

start ;

length ;

Returns:

indexA ;

Returns:

indexA ;

indexB ;

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

Returns:

String (MDN)
Number
String
String
String
String
String
Number
Number
Number
Number
Number
Number
String
String
String
String
String
String
String
String
Number
String
String
Boolean
String
Boolean
String
String
String
Number
String
Array
String
Array
String
String
String
Number
Number
String
String
Number
Number
String
String
String
Number
RegExp
Array
String
String
String
Number
String
Number
String
String
Number
String
Number
String
String
Number
String
RegExp
Function
String
RegExp
String
String
String
Function
String
String
String
String
RegExp
Number
Number
String
Number
Number
String
String
RegExp
Number
String
String
Number
String
String
String
String
Number
String
String
String
Number
String
Number
Number
String
Number
String
Number
Number
String
String
String
String
String
String
String
String
String
Number
String
String
String
String
Number
Number
Number
String
String
String
String
Boolean
Boolean
String
String
String
String
String
String
Number
String
Number
String
Number
Array
String
String
String
String
String
String
String
String
String
String
String
Number
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
String
length
anchor(nameAttribute)
big()
blink()
bold()
charAt(index)
charCodeAt(index)
codePointAt(index)
concat(string2)
concat(string2, stringN)
endsWith(searchString)
endsWith(searchString, length)
equals(other)
equalsIgnoreCase(other)
fixed()
fontcolor(color)
fontsize(size)
fromCharCode(num)
fromCodePoint(num)
includes()
indexOf(searchValue, fromIndex)
italics()
lastIndexOf(searchValue, fromIndex)
link(hrefAttribute)
localeCompare(otherString)
match(regexp)
normalize()
normalize(form)
padEnd(targetLength)
padEnd(targetLength, padString)
padStart(targetLength)
padStart(targetLength, padString)
repeat(count)
replace(regexp, function)
replace(regexp, newSubStr)
replace(substr, function)
replace(substr, newSubStr)
search(regexp)
slice(beginSlice)
slice(beginSlice, endSlice)
small()
split(separator, limit)
split(separator, limit)
startsWith(searchString)
startsWith(searchString, position)
strike()
sub()
substr(start)
substr(start, length)
substring(indexA)
substring(indexA, indexB)
sup()
toLocaleLowerCase()
toLocaleUpperCase()
toLowerCase()
toUpperCase()
trim()
trimEnd()
trimStart()