Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

strcmp_n (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: string

Requires: MathScript RT Module

Syntax

c = strcmp_n(a, b, n)

Legacy Name: strncmp

Description

Performs a case-sensitive comparison of the first n characters in the input strings.

Examples

Inputs

Name Description
a Specifies a string.
b Specifies a string.
n Specifies the number of characters in a and b to compare. n is a positive integer.

Outputs

Name Description
c Returns 1 if the first n characters in a and b are the same. Otherwise, this function returns 0. c is a Boolean.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

A = 'this is a test for strcmp_n'
B = 'this can not be true'
C = strcmp_n(A, B, 3)

Related Topics

findstr
strcmp
strcmp_i
strcmp_ni
strfindall
strmatchall


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit