buenas,
quiero contar caracteres de palabras... pero las palabras len no las cuenta bien
ya se que en una palabra con tilde el tilde es un carácter aparte.
la cuestión es como contar palabras con tilde si que se contabilice el tilde.
les a pasado eso? como lo resolvieron?
pensando ahora mismo.. tal vez poner un contador y cuando se detecte á é í ó ú sume en un contador y eso se le reste a
palabra tiene:"&Len(palabrax)-contador&" caracteres"
que les parece este tema?
Problema Para Contar Caracteres Con Tilde Con Len[Resuelto]
Subject: Problema Para Contar Caracteres Con Tilde Con Len[Resuelto]
Last edited by v3ctor on Wednesday, 12 October 2016, 11:41; edited 1 time in total
Last edited by v3ctor on Wednesday, 12 October 2016, 11:41; edited 1 time in total
Subject: Re: Problema Para Contar Caracteres Con Tilde Con Len
Ver: http://gambaswiki.org/wiki/cat/string
Y en especifico: http://gambaswiki.org/wiki/comp/gb/string/len
Saludos.
Citar:
Ver: http://gambaswiki.org/wiki/cat/string
Y en especifico: http://gambaswiki.org/wiki/comp/gb/string/len
Saludos.
Subject: Re: Problema Para Contar Caracteres Con Tilde Con Len
La pregunta se ha resuelto en varios hilos anteriores en este foro, alguno bastante reciente. Usa el buscador...
Saludos
Saludos
Subject: Re: Problema Para Contar Caracteres Con Tilde Con Len
Tenes que usar string.len() en vez de len() a secas.
Saludos.
Saludos.
Subject: Re: Problema Para Contar Caracteres Con Tilde Con Len
efectivamente esa es la respuesta
tincho escribió: [Ver mensaje]
efectivamente esa es la respuesta
Public Sub btnEjecutar_Click()
Dim valor As String
Dim a As Integer
Inc Application.Busy
DicContador = New Collection
BuscarTextoElegido(subR1.ObtenerNombreTabla(cbxLibros.Current.Text))
tvPalabras.Rows.Count = DicContador.Count
For Each valor In DicContador
tvPalabras[a, 0].Text = DicContador.Key
tvPalabras[a, 1].Text = valor
tvPalabras[a, 2].Text = String.Len(DicContador.Key) 'aquí
Inc a
Next
Dec Application.Busy
End
Dim valor As String
Dim a As Integer
Inc Application.Busy
DicContador = New Collection
BuscarTextoElegido(subR1.ObtenerNombreTabla(cbxLibros.Current.Text))
tvPalabras.Rows.Count = DicContador.Count
For Each valor In DicContador
tvPalabras[a, 0].Text = DicContador.Key
tvPalabras[a, 1].Text = valor
tvPalabras[a, 2].Text = String.Len(DicContador.Key) 'aquí
Inc a
Next
Dec Application.Busy
End
Subject: Re: Problema Para Contar Caracteres Con Tilde Con Len[Resuelto]
Como regla general conviene usar:
String.Byte
String.Chr
String.Code
String.Comp
String.InStr
String.Index
String.IsValid
String.LCase
String.Left
String.Len
String.Lower
String.Mid
String.Pos
String.RInStr
String.Right
String.UCase
String.UCaseFirst
String.Upper
Por experiencias previas Upper y Lower me dieron problemas pero sin embargo String.UCase y String.LCase no lo hicieron.
Saludos.
String.Byte
String.Chr
String.Code
String.Comp
String.InStr
String.Index
String.IsValid
String.LCase
String.Left
String.Len
String.Lower
String.Mid
String.Pos
String.RInStr
String.Right
String.UCase
String.UCaseFirst
String.Upper
Por experiencias previas Upper y Lower me dieron problemas pero sin embargo String.UCase y String.LCase no lo hicieron.
Saludos.
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo
Generation Time: 0.1287s (PHP: -34% SQL: 134%)
SQL queries: 24 - Debug Off - GZIP Enabled