How to split string?

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Feb 26, 2015
Company: Uguz Limited sirketi

hi,

mystring="a@b@c@d";

//split code ??????

myarray[1]="a";
myarray[2]="b";
myarray[3]="c";
myarray[4]="d";

myarraylength= //length ??

Edited: Erdogan Uguz - Feb 16, 2016 12:29 AM
 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Nov 19, 2012
Company:

StrSplit
Syntax:

StrSplit(<String>, <Separator>, <IncludeBlank>)
Parameters:

<String> (required)

Type: String.
Separated string.
<Separator> (required)

Type: String.
Character string where every character is an individual delimiter.
<IncludeBlank> (optional)

Type: Boolean.
Shows if it is required to include the empty strings which can result from a separation of a source string while calculating the result.
Default value: True.
Returned value:

Type: Array.
Array with strings resulting from splitting of the source string.
Description:

Splits a string into parts according using the specified delimiter.

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).
See also:

Global context, method StrConcat

 
#3
People who like this:0Yes/0No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Hello!

It is very strange but when I try

Code
&AtServer
Procedure SomeProcedure()
SomeTring = "HEllo World";
SplittedString = StrSplit(SomeString, "H", TRUE)

EndProcedure



I get an Error "Procedure or function with this name was not defined".

What's wrong?

Thank you for any advice!

 
#4
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Apr 18, 2012
Company:

Hello, Lioudmila.

Function "StrSplit" provided since version 8.3.6.



@Admins There is a mistake in the function name in the file V8Update.htm.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.