IT. Expert System.

VBS

Split()


Description

The Split() function returns a zero-based, one-dimensional array that contains a specified number of substrings.

This function has the form:

Split(expression [,delimiter [,count [,compare]]])
Parameter Description
expression (required) A string expression that contains substrings and delimiters
delimiter (optional) A string character used to identify substring limits.

(default = space character)
count (optional) The number of substrings to be returned. -1 indicates that all substrings are returned
compare (optional) Specifies the string comparison to use.

This parameter can have one of the following values:
  • 0 = vbBinaryCompare - Perform a binary comparison
  • 1 = vbTextCompare - Perform a textual comparison

Examples

The following examples show the basic use of this function:

Example 1

a = Split("split this string")

For Each x In a
  Msgbox(x)
Next

This produces the following result (each line in a separate pop-up message box):

split
this
string

Example 2

Splitting the text using the delimeter parameter:

a = Split("cow, pig, goat",",")

For Each x In a
  Msgbox(x)
Next

This produces the following result (each line in a separate pop-up message box):

cow
pig
goat

Example 3

Splitting the text using the delimeter parameter, and the count parameter:

a = Split("split this string"," ",2)

For Each x In a
  Msgbox(x)
Next

This produces the following result (each line in a separate pop-up message box):

split
this string

Miscellaneous Information

Supported in Version: 2.0


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 265 / 158692980. Delta: 0.00158 с