[Ajuda] Strsplit
#2

Olб Shickcard,

Apesar de aqui nгo ser um fуrum de suporte para tal linguagem, vou tentar explicar um pouco aqui.

Esta funзгo retorna a array de uma string contendo as substrings delimitadas dadas pelo sistema, funcionando como um strtok.


Parвmetros:

PHP код:
string[] string.split(string[] separator
!! Separator: o separador dado obviamente...

!! Returns: retorna a array da string delimitada por um ou mais caracteres no separator


Exemplo:

PHP код:
using System;
using System.Windows.Forms;

namespace 
WindowsApplication1
{
    public 
partial class Form1 Form
    
{
        public 
Form1()
        {
            
InitializeComponent();
        }

        private 
void button1_Click(object senderEventArgs e)
        {
            
string str null;
            
string[] strArr null;
            
int count 0;
            
str "CSharp split test";
            
char[] splitchar = { ' ' };
            
strArr str.Split(splitchar);
            for (
count 0count < = strArr.Length 1count++)
            {
                
MessageBox.Show(strArr[count]);
            } 
        }
    }

Atenciosamente,
Falcon.
Reply


Messages In This Thread
[Ajuda] Strsplit - by Macintosh - 19.09.2011, 03:03
Re: [Ajuda] Strsplit - by Falcon. - 19.09.2011, 11:55
Re: [Ajuda] Strsplit - by WLSF - 19.09.2011, 11:56
Re: [Ajuda] Strsplit - by Falcon. - 19.09.2011, 12:00
Re: [Ajuda] Strsplit - by WLSF - 19.09.2011, 12:02
Re: [Ajuda] Strsplit - by Shelby - 19.09.2011, 12:03
Re: [Ajuda] Strsplit - by Macintosh - 19.09.2011, 13:16
Re: [Ajuda] Strsplit - by [O.z]Caroline - 19.09.2011, 14:32

Forum Jump:


Users browsing this thread: 2 Guest(s)