LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Left() function location in CVI library

Trying to use  function >> Left(string, NumberofCharacters) that is available in TestStand in a CVI file. Cannot find which CVI library this is located in.  Above functions returns substring of argument string of length NumberofCharaters.
0 Kudos
Message 1 of 3
(3,320 Views)
You can use strncpy (tgtString, srcString, NumberOfCharacters);
 
Please read carefully the online help for the function to understand its behaviour in the various cases: it is normally enough to add
tgtString[NumberOfCharacters] = 0; to ensure that the string is null-terminated, but you must be aware of strncoy behaviour with different lenght strings.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 3
(3,314 Views)
I have never come accross the left function in CVI. However, I believe the function StringCopyMax found in Programmers Toolbox>>String Handeling does the same function that you are looking for.
 
Regards,
 
Jack J.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,289 Views)