How to count the quantity of a specific character in a String

Hi, guys!

I’ve an issue. How could I count the number “|” in this string below. I’ve already tried but it always brings me this error.

Screenshot_3

Nome Livro_Numero Livro_1.pdf|Nome Livro|Numero Livro|Nascimento|Planetario|Digitado|Numero ultima folha|Ano inicial|Ano final|Registros por folha|1

@Caio_Dultra
give a try on csvConteudo.Split("|“c)
or do it directly with:
csvConteudo.Count(Function (x) x.Equals(”|"c)) returning the count as Int32

9 Likes

It worked flawless. Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.