GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Postagens recentes
|
Conecte-se...
|
Desconectar
|
Português
Inicio
→
WINDEV 2024
→
Complete (Function) Left
Complete (Function) Left
Iniciado por marcov, mai., 07 2024 6:33 PM - 6 respostas
Conecte-se…
marcov
#1
Membro registado
56 mensagems
Publicado em maio, 07 2024 - 6:33 PM
hi,
How can I complete a string but from the left?
thanks
Denunciar
0
0
Andrea Chiadò Piat
#2
Membro registado
59 mensagems
Publicado em maio, 10 2024 - 11:38 AM
Procedure
LeftComplete
(
s
InitialString
is string
,
n
FinalLenght
is int
)
RESULT
Complete
(
""
,
n
FinalLenght
-
Length
(
s
InitialString
)
)
+
s
InitialString
Denunciar
0
0
Mike James
#3
Membro registado
25 mensagems
Publicado em maio, 14 2024 - 12:48 AM
If only the Complete function had a parameter to complete on the left!
Denunciar
0
0
Antonino
#4
Publicado em maio, 28 2024 - 6:06 PM
Here's how it can be done using built in functions:
StringReverse
(
Complete
(
StringReverse
(
"TEST_STRING"
)
,
25
,
"A"
)
)
This will return "AAAAAAAAAAAAA_TEST_STRING"
BR
Denunciar
0
0
Sanjog Ghonge
#5
Publicado em julho, 15 2024 - 12:47 PM
A1 is string = "SANJOG"
A2 is string = RepeatString("0", Max(0, 10 - Length(A1))) + A1
Output : A2 = "0000SANJOG"
(You can change according to your requirement)
"0" = Padding element
10 = limit for string length
Denunciar
1
0
ghongesanjog
#6
Membro registado
2 mensagems
Publicado em julho, 15 2024 - 1:05 PM
A1 is string = "SANJOG"
A2 is string = RepeatString("0", Max(0, 10 - Length(A1))) + A1
Output : A2 = "0000SANJOG"
(You can change according to your requirement)
"0" = Padding element
10 = limit for string length
Denunciar
1
0
asolares69
#7
Membro registado
5 mensagems
Publicado em agosto, 09 2024 - 2:51 AM
a1 is string = "123"
a2 is string = "0000000000"
right( a2+a1, 10 )
"0000000123"
--
Alex Solares
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 25
WINDEV 26
WINDEV 2024
WINDEV 2024
WINDEV 2024
WINDEV 2024
WEBDEV 2024
WEBDEV 2024
WEBDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV Mobile 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
WINDEV (versões anteriores)
WINDEV (versões anteriores)
WEBDEV (versões anteriores)
WINDEV Mobile (versões anteriores)
Reports & Queries
Off-topic
Ferramentas
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto