NeuroExplorer
  • Tutorials
  • How-to Guides
  • Reference
    • Analysis Reference
    • Supported File Formats
    • Scripting Reference
      • Introduction to Scripting in NeuroExplorer
      • File Read and Write
      • File Selection
      • Reading and Writing Result Files
      • Reading and Writing Binary and Text Files
      • Document Properties
      • Document Variables
      • Creating New Variables
      • Deleting Variables
      • Copying Variables
      • Selecting Variables
      • Properties of Variables
      • Getting Variable Data
      • Modifying Variable Data and Metadata
      • Operations on Variables
      • Analysis Functions
      • Numerical Results
      • User Interface Functions
      • Matlab Functions
      • Excel Functions
      • PowerPoint Functions
      • Running Scripts
      • Math Functions
      • String Functions
        • Left
        • Mid
        • Right
        • Find
        • StrLength
        • NumToStr
        • StrToNum
        • GetNumFields
        • GetField
        • CharToNum
        • NumToChar
      • Debug Functions
    • Controlling NeuroExplorer from Matlab
  • NeuroExplorer Python Packages
NeuroExplorer
  • Reference
  • Scripting Reference
  • String Functions
  • Right

Right

Returns a substring that ends at the end of the string.

Syntax

Right(string, nchar)

Parameters

Parameter

Type

Description

string

string

String parameter.

nchar

number

Number of characters in the substring

Return

Extracts right nchar characters from string, returns string.

Note

In Python, use string slicing: https://pythoncentral.io/cutting-and-slicing-strings-in-python/

Examples

Python

s = 'abcdefg'
sub = s[-3:]
# sub now is "efg"

NexScript

sub = Right("abcdefg", 3)
% sub now is "efg"
Previous Next

© Copyright 1998-2025, Nex Technologies.

Built with Sphinx using a theme provided by Read the Docs.