..:: MX Studio Fóruns ::..: Adicionando uma seqüência de caracteres - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Adicionando uma seqüência de caracteres

#1 User is offline   xanburzum 

  • Group: Administrador
  • Posts: 1940
  • Joined: 04-November 08

Posted 21 June 2009 - 04:24 PM

A função AddChar é usada para adicionar uma seqüência de caracteres. Existem três
argumentos necessários : Entrada de Adição, Local.

O argumento de entrada é a seqüência de manipular. O argumento é uma adição
string de texto para acrescentar ao input string. A localização é um argumento muito
valor que representa o local para adicionar o texto especificado, para além de Entrada
string.

sintaxe:

string = AddChar(Entrada , Adição, Local)

exemplo:

CÓDIGO
<%
dim txt
txt= "Ajudem-me! com o computador"

'", não consigo sair " para o final de uma string
Response.Write AddChr(txt, ", não consigo sair", Len(a)) & "<BR>"
' returns: "Ajudem-me! com o computador, não consigo sair"

%>



code:

CÓDIGO
<%
Private Function AddChar(byVal string, byVal Adição, byVal Local)
    Dim leftString, rightString
    On Error Resume Next
    leftString = Left(string, Local)
    If Err Then
        leftString = ""
        Local= 0
    End If
    rightString = Mid(string, Local+ 1)
    AddChar = leftString & Adição & rightString
    On Error GoTo 0
End Function
%>

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)