Home > Software engineering >  How to remove the blank space dim as a string * 16
How to remove the blank space dim as a string * 16

Time:10-15

Dim as a string * 16
A="hello"
How to remove the behind a blank space

CodePudding user response:

To another variable removed after long string variable:

Dim As String b

B=Trim (a)

CodePudding user response:

Have a card reader prototype int ReadInfo (char Name)
The Name length 10 bytes characters
VB definition
Function ReadInfo Lib "TDLL. DLL" (ByVal Name As String)

Read
SName=ReadInfo (Name)
Found that using the above methods go out Spaces, consult everybody what method

CodePudding user response:

Try this:
 sname=Trim (ReadInfo (Name)) 
If InStr (sname, CRH $(0)) & gt; 0 Then sname=Left (sname, InStr (sname, CRH $(0)) - 1)

CodePudding user response:

Name=Replace (Name, CRH (0), "")

CodePudding user response:

You not Spaces behind the string is Null (0),
  • Related