Skip to main content

5-4-1 String functions

Function name

Feature

AT

Retrieves numeric-type data indicating what digit position the specified string is in from the beginning, when counting half-width characters as 1 digit and full-width characters as 2 digits. If the string is located at the beginning, 1 is retrieved.

Whether full-width or half-width is determined based on the SVF-specific specification.

ATW

Retrieves numeric-type data indicating what character position the specified string is in from the beginning of the text-type data. If the string is located at the beginning, 1 is retrieved.

LEFT

Retrieves a partial string of the specified number of digits from the beginning, counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

LEFTW

Retrieves a partial string of the specified number of characters from the beginning.

LEN

Retrieves the number of digits of data as numeric-type data, when counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

LENW

Retrieves the number of characters of data as numeric-type data.

REP

Repeatedly prints a string for the specified number of times.

RIGHT

Retrieves a partial string of the specified number of digits from the end of the data, counting half-width characters as 1 digit and full-width characters as 2 digits. The last digit is 1.

Whether full-width or half-width is determined based on the SVF-specific specification.

RIGHTW

Retrieves a partial string of the specified number of characters from the end of the data. The last digit is 1.

SPC

Inserts the specified number of half-width spaces.

MID

Retrieves a partial string of the specified number of digits, starting at a specified digit from the beginning of the string, counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

MIDW

Retrieves a partial string of the specified number of characters, starting at a specified point.

REPLACE

Replaces a character or string with the specified string.

REVERSE

Reverses the string order.

AT

Feature

Retrieves numeric-type data indicating what digit position the specified string is in from the beginning, when counting half-width characters as 1 digit and full-width characters as 2 digits. If the string is located at the beginning, 1 is retrieved.

Whether full-width or half-width is determined based on the SVF-specific specification.

Format

AT(string_or_character_field_name,character)

Settings

  1. In "string_or_character_field_name", specify the text-type data in which to search, or the name of the field that contains the data.

  2. In "character", specify the text-type data to search for or the name of the field that contains the data.

  3. This will retrieve what digit position "character" is from the beginning of "string_or_character_field_name".

Caution

Because the value is retrieved as numeric-type data, if the function is used in the edit-formula, the value must be converted into text-type data by using the FORMAT or STR function before using the result.

Usage examples

Prerequisite

When "Tokyo" is entered in the text field "S1"

  • Example 1: When specifying the character "k" in the field "S1", and retrieving the digit position in the text field "S2"

    • Edit-formula: STR(AT(S1,"k"))

    • Printing result: "3"

  • Example 2: When specifying the character "k" in the field "S1", and retrieving the digit position in the numeric field "I2"

    • Calculation-formula: AT(S1,"k")

    • Printing result: 3

  • Example 3: When specifying the character "k" in the field "S1", and retrieving and outputting the retrieved data in the numeric field "I2"

    • Edit-formula: FORMAT(AT(S1,"k"),"ZZ9")

    • Printing result: "sdCommon_iTri_W_Up.gifsdCommon_iTri_W_Up.gif3" (sdCommon_iTri_W_Up.gif=half-width space)

ATW

Feature

Retrieves numeric-type data indicating what character position the specified string is in from the beginning of the text-type data. If the string is located at the beginning, 1 is retrieved.

Format

ATW(string_or_character_field_name,search_string)

Settings

  1. In "string_or_character_field_name", specify the text-type data in which to search, or the name of the field that contains the data.

  2. In "search_string", specify the text-type data to search for, or the name of the field that contains the data.

  3. This will retrieve the character position of "search_string" from the beginning of "string_or_character_field_name".

Caution

Because the value is retrieved as numeric-type data, if the function is used in the edit-formula, the value must be converted into text-type data by using the FORMAT or STR function before using the result.

Usage examples

Prerequisite

When "東京都sdCommon_iTri_W_Up.gif渋谷区" is entered in the text field "S1"

  • Example 1: When specifying the character "京" in the field "S1," and retrieving the character position in the text field "S2"

    • Edit-formula: STR(ATW(S1,"京"))

    • Printing result: "2"

  • Example 2: When specifying the character "渋" in the field "S1", and retrieving the character position in the numeric field "I2"

    • Calculation-formula: ATW(S1,"渋")

    • Printing result: 5

  • Example 3: When specifying the character "渋" in the field "S1", and printing the retrieved data in the numeric field "I2"

    • Edit-formula: FORMAT(ATW(S1,"渋"),"ZZ9")

    • Printing result: "sdCommon_iTri_W_Up.gifsdCommon_iTri_W_Up.gif5" (sdCommon_iTri_W_Up.gif=half-width space)

LEFT

Feature

Retrieves a partial string of the specified number of digits from the beginning, counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

Format

LEFT(string_or_character_field_name,number_of_digits)

Settings

  1. In "string_or_character_field_name", specify the text-type data to retrieve, or the name of the field that contains the data.

  2. In "number_of_digits", specify a numeric value for the number of digits to retrieve from the beginning of the data.

  3. This will output the specified number of digits from the beginning of "string_or_character_field_name".

Settings

Print Status

When the value of "number_of_digits" is less than one

""

Usage examples

Prerequisite

When "Shibuya, Tokyo" is entered in the text field "S1"

  • Example 1 When outputting data for six digits from the left of the field "S1" in the character type field "S2"

    • Edit-formula: LEFT(S1,6)

    • Printing result: "Shibuya"

  • Example 2 When acquiring data for six digits from the left of the field "S1" as the value of the character type field "S2"

    • Calculation-formula: LEFT(S1,6)

    • Printing result: "Shibuya"

LEFTW

Feature

Retrieves a partial string of the specified number of characters from the beginning.

Format

LEFTW(string_or_character_field_name,number_of_character)

Settings

  1. In "string_or_character_field_name", specify the text-type data to retrieve, or the name of the field that contains the data.

  2. In "number_of_character", specify a numeric value for the number of characters to retrieve from the beginning of the data.

  3. This will output specified number of characters from the left of "string_or_character_field_name".

Settings

Print Status

When the value of "number_of_character" is less than one

""

Usage examples

Prerequisite

When "東京都sdCommon_iTri_W_Up.gif渋谷区" is entered in the text field "S1"

  • Example 1 When outputting data for three characters from the left of the field "S1" in the character type field "S2"

    • Edit-formula: LEFTW (S1,3)

    • Printing result: "東京都"

  • Example 2 When acquiring data for six characters from the left of the field "S1" as the value of the character type field "S2"

    • Calculation-formula: LEFTW (S1,6)

    • Printing result: "東京都sdCommon_iTri_W_Up.gif渋谷" (sdCommon_iTri_W_Up.gif=half-width space)

LEN

Feature

Retrieves the number of digits of data as numeric-type data, when counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

Format

LEN(string_or_character_field_name)

Settings

  1. In "string_or_character_field_name", specify the text-type data for which to obtain the number of digits, or the name of the field that contains the data.

  2. This will retrieve the number of digits of "string_or_character_field_name" as numeric-type data.

Caution

Because the value is retrieved as numeric-type data, if the function is used in the edit-formula, the value must be converted into text-type data by using the FORMAT or STR function before using the result.

Usage examples

Prerequisite

When "Tokyo" is entered in the text field "S1"

  • Example 1: When outputting the number of digits of data from the field "S1" to the text field "S2"

    • Edit-formula: STR(LEN(S1))

    • Printing result: "6"

  • Example 2: When retrieving the number of digits of data from the field "S1", and using it as the value of the numeric field "I2"

    • Calculation-formula: LEN(S1)

    • Printing result: 6

  • Example 3: When outputting the number of digits of data from the field "S1" to the numeric field "I2"

    • Edit-formula: FORMAT(LEN(S1),"ZZ9")

    • Printing result: "sdCommon_iTri_W_Up.gifsdCommon_iTri_W_Up.gif6" (sdCommon_iTri_W_Up.gif=half-width space)

LENW

Feature

Retrieves the number of characters of data as numeric-type data.

Format

LENW(string_or_character_field_name)

Settings

  1. In "string_or_character_field_name", specify the text-type data for which to obtain the number of characters, or the name of the field that contains the data.

  2. This will retrieve the number of characters of "string_or_character_field_name" as numeric-type data.

Caution

Because the value is retrieved as numeric-type data, if the function is used in the edit-formula, the value must be converted into text-type data by using the FORMAT or STR function before using the result.

Usage examples

Prerequisite

When "東京都sdCommon_iTri_W_Up.gif渋谷区" is entered in the text field "S1"

  • Example 1: When outputting the number of characters from the field "S1" to the text field "S2"

    • Edit-formula: STR(LENW(S1))

    • Printing result: "7"

  • Example 2: When retrieving the number of characters from the field "S1", and using it as the value of the numeric field "I2"

    • Calculation-formula: LENW(S1)

    • Printing result: 7

  • Example 3: When outputting the number of characters from the field "S1" to the numeric field "I2"

    • Edit-formula: FORMAT(LENW(S1),"ZZ9")

    • Printing result: "sdCommon_iTri_W_Up.gifsdCommon_iTri_W_Up.gif7" (sdCommon_iTri_W_Up.gif=half-width space)

REP

Feature

Repeatedly prints a string for the specified number of times.

Format

REP(string_or_character_field_name,count)

Settings

  1. In "string_or_character_field_name", specify the text-type data to repeat, or the name of the field that contains the data.

  2. In "count", specify the number of times to repeat the data.

  3. "string_or_character_field_name" is repeatedly displayed for the specified number of times.

Usage examples

Prerequisite

When "Tokyo" is entered in the text field "S1"

  • Example 1: When outputting the data from the field "S1" twice to the text field "S2"

    • Edit-formula: REP(S1,2)

    • Printing result: "TokyoTokyo"

  • Example 2: When retrieving the data from the field "S1" repeated twice, and using as the value of the text field "S2"

    • Calculation-formula: REP(S1,2)

    • Printing result: "TokyoTokyo"

RIGHT

Feature

Retrieves a partial string of the specified number of digits from the end of the data, counting half-width characters as 1 digit and full-width characters as 2 digits. The last digit is 1.

Whether full-width or half-width is determined based on the SVF-specific specification.

Format

RIGHT(string_or_character_field_name,number_of_digits)

Settings

  1. In "string_or_character_field_name", specify the text-type data to retrieve, or the name of the field that contains the data.

  2. In "number_of_digits", specify a numeric value for the number of digits to retrieve from the end of the data.

  3. This will output the specified number of digits from the end of "string_or_character_field_name".

Settings

Print Status

When the value of "number_of_digits" is less than one

""

Usage examples

Prerequisite

When "Shibuya, Tokyo" is entered in the text field "S1"

  • Example 1: When outputting data for six digits from the right of the field "S1" in the character type field "S2"

    • Edit-formula: RIGHT(S1,6)

    • Printing result: "Tokyo"

  • Example 2: When acquiring data for six digits from the right of the field "S1" as the value of the character type field "S2"

    • Calculation-formula: RIGHT (S1,6)

    • Printing result: "Tokyo"

RIGHTW

Feature

Retrieves a partial string of the specified number of characters from the end of the data. The last digit is 1.

Format

RIGHTW(string_or_character_field_name,number_of_character)

Settings

  1. In "string_or_character_field_name", specify the text-type data to retrieve, or the name of the field that contains the data.

  2. In "number_of_character", specify a numeric value for the number of characters to retrieve from the end of the data.

  3. This will output the specified number of characters from the end of "string_or_character_field_name".

Settings

Print Status

When the value of "number_of_character" is less than one

""

Usage examples

Prerequisite

When "東京都sdCommon_iTri_W_Up.gif渋谷区" is entered in the text field "S1"

  • Example 1: When retrieving three characters of data from the right of the field "S1", and outputting to the text field "S2"

    • Edit-formula: RIGHTW (S1,3)

    • Printing result: "渋谷区"

  • Example 2: When retrieving six characters of data from the right of the field "S1", and using as the value of the text field "S2"

    • Calculation-formula: RIGHTW (S1,6)

    • Printing result: "京都sdCommon_iTri_W_Up.gif渋谷区"

SPC

Feature

Inserts the specified number of half-width spaces.

Format

SPC(number_of_characters)

Settings

In "number_of_characters", specify a numeric value for how many half-width spaces to insert.

Caution

Be sure to set the "Edit style" of the field to "None". SVF executes the edit-formula first, and then processes the field's edit style. Therefore, even if blank spaces are inserted using the SPC function, those blank spaces are eliminated afterwards if left-align is selected in the edit style of the field.

Usage examples

Prerequisite

When "Shibuya, Tokyo" is entered in the text field "S1"

  • Example 1: When inserting two half-width spaces at the beginning of the data, and outputting them from the field "S1" to the text field "S2".

    • Edit-formula: SPC(2)+S1

    • Printing result: "sdCommon_iTri_W_Up.gifsdCommon_iTri_W_Up.gifShibuya, Tokyo" (sdCommon_iTri_W_Up.gif=half-width space)

  • Example 2: When using the data from the field "S1" as the value of the text field "S2", and inserting two half-width spaces at the beginning

    • Calculation-formula: SPC(2)+S1

    • Printing result: "sdCommon_iTri_W_Up.gifsdCommon_iTri_W_Up.gifShibuya, Tokyo" (sdCommon_iTri_W_Up.gif=half-width space)

MID

Feature

Retrieves a partial string of the specified number of digits, starting at a specified digit from the beginning of the string, counting half-width characters as 1 digit and full-width characters as 2 digits.

Whether full-width or half-width is determined based on the SVF-specific specification.

Format

MID(string_or_character_field_name,start_index,number_of_digits)

Settings

  1. In "string_or_character_field_name", specify the text-type data to retrieve, or the name of the field that contains the data.

  2. In "start_index", specify the number of digits from the beginning of the string at which to start retrieving data.

  3. In "number_of_digits", specify the number of digits you want to retrieve beginning at "start_index".

  4. This will retrieve the portion of data specified in "number_of_digits" from "string_or_character_field_name", starting at "start_index".

Setting details

Print Status

When "start_index" is greater than the total number of digits in the data

""

When the value of "start_index" is less than one

""

When the value of "number_of_digits" is less than one

""

Usage examples

Prerequisite

When "Shibuya, Tokyo" is entered in the text field "S1"

  • Example 1: When retrieving four digits of data starting from the seventh digit of the field "S1", and outputting to the text field "S2"

    • Edit-formula: MID(S1,7,4)

    • Printing result: "Shibuya"

  • Example 2: When retrieving four digits of data starting from the seventh digit of the field "S1", and using as the value of the text field "S2"

    • Calculation-formula: MID(S1,7,4)

    • Printing result: "Shibuya"

MIDW

Feature

Retrieves a partial string of the specified number of characters, starting at a specified point.

Format

MIDW(string_or_character_field_name,start_index,number_of_character)

Settings

  1. In "string_or_character_field_name", specify the text-type data to retrieve, or the name of the field that contains the data.

  2. In "start_index", specify the number of characters from the beginning of the string at which to start retrieving data.

  3. In "number_of_character", specify the number of characters you want to retrieve beginning at "start_index".

  4. This will retrieve the specified characters of data from "string_or_character_field_name", starting at "start_index".

    Setting details

    Print Status

    When "start_index" is greater than the total number of characters in the data

    ""

    When the value of "Layout" is less than one

    ""

    When the value of "number_of_character" is less than one

    ""

Usage examples

Prerequisite

When "東京都sdCommon_iTri_W_Up.gif渋谷区" is entered in the text field "S1"

  • Example 1: When retrieving three characters of data starting from the first character of the field "S1", and outputting to the text field "S2"

    • Edit-formula: MIDW(S1,1,3)

    • Printing result: "東京都"

  • Example 2: When retrieving two characters of data starting from the fifth character of the field "S1", and using as the value of the text field "S2"

    • Calculation-formula: MIDW(S1,5,2)

    • Printing result: "渋谷"

REPLACE

Feature

Replaces a character or string with the specified string.

Format

REPLACE(string_or_character_field_name,search_string,substitution_string)

Settings

  1. In "string_or_character_field_name", specify the text-type data to be replaced, or the name of the field that contains the data.

  2. In "search_string", specify the characters to be replaced.

  3. In "substitution_string", specify the characters to be displayed after the replacement.

  4. This will replace "search_string" in "string_or_character_field_name" with "substitution_string".

Usage examples

Prerequisite

When "John Smith" is entered in the text field "S1"

  • Example 1: When retrieving the data from the field "S1" with the word "John" replaced with "Jane", and outputting to the text field "S2"

    • Edit-formula: REPLACE(S1,"John","Jane")

    • Printing result: "Jane Smith"

  • Example 2: When retrieving the data from the field "S1" with the word "John" replaced with "Jane", and using as the value of the text field "S2"

    • Calculation-formula: REPLACE(S1,"John","Jane")

    • Printing result: "Jane Smith"

Caution

Be sure to set the "Edit style" of the field to "None", when replacing the data with blank space. SVF executes the edit-formula first, and then processes the field's edit style. Therefore, even if blank spaces are inserted using the REPLACE function, those blank spaces are eliminated afterwards if left-align is selected in the edit style of the field.

REVERSE

Feature

Reverses the string order.

Format

REVERSE(string_or_character_field_name)

Settings

In "string_or_character_field_name", specify the text-type data that you want to output in reverse, or the name of the field that contains the data.

Usage examples

Prerequisite

When "ABCDE" is entered in the text field "S1"

  • Example 1: When retrieving the data from the field "S1" in the reverse order as "EDCBA", and outputting to the text field "S2"

    • Edit-formula: REVERSE(S1)

    • Printing result: "EDCBA"

  • Example 2: When retrieving the data from the field "S1" in the reverse order as "EDCBA", and using as the value of the text field "S2"

    • Calculation-formula: REVERSE(S1)

    • Printing result: "EDCBA"