Difference between revisions of "NthFieldB"

From Xojo Documentation

m (Text replacement - "{{Deprecated|" to "{{DeprecatedItem|")
(Syntax)
 
Line 11: Line 11:
 
''result''='''NthFieldB'''(''source'', ''separator'', ''fieldNumber'')<br />
 
''result''='''NthFieldB'''(''source'', ''separator'', ''fieldNumber'')<br />
 
'''OR'''<br />
 
'''OR'''<br />
''result''=''stringVariable''.'''NthFieldB'''(''separator'', ''fieldNumber'') <font color="green"><i>Introduced 5.0</i></font>
+
''result''=''stringVariable''.'''NthFieldB'''(''separator'', ''fieldNumber'')
 
{| class="genericTable"
 
{| class="genericTable"
  

Latest revision as of 00:15, 23 February 2022

Method

Returns a field from a row of data. NthFieldB is identical to NthField except that it treats the source data as binary data. The first field is numbered 1.

Syntax

result=NthFieldB(source, separator, fieldNumber)
OR
result=stringVariable.NthFieldB(separator, fieldNumber)

Part Type Description
result String The field value desired.
source String The string that contains the desired field, with the field separated by the Separator character.
separator String The character that separates the columns of data.
fieldNumber Integer The column number of the desired field. The first field is numbered 1.
stringVariable String Any variable of type String.

Notes

The NthFieldB function returns the field value from the source that precedes the fieldNumber occurrence of the separator in the source.

If fieldNumber is out of bounds, an empty string is returned. NthFieldB is not case-sensitive.

Examples

This example returns "Smith"

Dim field As String
field = NthFieldB("Dan*Smith*11/22/69*5125554323*Male", "*", 2)

Using the second syntax:

Dim s, field As String
s = "Dan*Smith*11/22/69*5125554323*Male"
field = s.NthFieldB("*", 2)
MsgBox(field)

See also the example that illustrates how to populate a PopupMenu control.

See Also

CountFieldsB, NthField, SplitB functions.