Android Question remove CRLF from string

ilan

Expert
Licensed User
Longtime User
hi

i have a label and the text of this label is:

label1.text = "bla" & CRLF & "mmm"
what i get is:

bla
mmm

now if i would like to get the last 3 letters i do it like this:

dim txt as string
txt = label1.text.SubString2(3,label1.Text.Length)

everythig until now works great
but now i would like to use "txt" in msgbox, or labels,....

and i always get the CRLF (empty line) and the txt.text
i want only the txt without the CRLF

how can i do it? thank you
 

Ohanian

Active Member
Licensed User
Longtime User
Hi,

just replace CRLF with an empty string :

txt = txt.replace(CRLF, "")
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
bla & mmm is not really the real text..

i have to use CRLF because my text it to long for one line and i also want to use the text that is in this line i post you the pics that you will understand

this is my app called MY SALARY its a salary calculator and shift manager

i added an option to calculate overtime after someone had x hours in a week (someone ask me for that, until now u could only calculate overtime in daily shift now its possible to calculate overtime for a week)

therefore i add a new panel in my clv and the time of the overtime and the dates, as you see i need to add 2 lines

c1.png


no if someone press the panel or the button he get a msgbox like this

c3.png


as you can see he add CRLF and i dont want this looks bad
so thanks ohanian now it looks like this


c2.png


now you understand??
 
  • Like
Reactions: eps
Upvote 0
Top