Modules
Objects/Functions
SuiteScript 2.0
{File}.getSegments({separator: {string*}})
N/file Module
File.getSegments()
Method Description:
Method used to return the iterator of segments delimited by a separator.
Separator is included in each segment.
Empty separator is not allowed.
Returns:
Iterator
Supported Script Types:
Server-side scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
None
Module:
N/file Module
Since:
2019.1
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=File.getSegments(options)
Example:
// Code Example 1
// Add additional code
//...
var statementFile = context.input.file;
var statementSegmentIterator = statementFile.getSegments({
separator: '\\|_|/'
}).iterator();
statementSegmentIterator.each(function (segment) {
log.debug({
title: 'STATEMENT TEXT',
details: segment.value
});
return true;
//...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1543844004.html