LabWindows/CVI

Ini_SetAddQuotesToStrings

int Ini_SetAddQuotesToStrings (IniText handle, int addQuotesToStrings);

Purpose

By default, when you add a string item to the Ini_Text and write that Ini_Text using Ini_WriteToFile or Ini_WriteGeneric, Ini_WriteToFile and Ini_WriteGeneric add surrounding double quotation marks to the string value. The quotation marks are used only in formatting the written output and are not included when reading the values back using the Ini_Get... functions.

Specifying 0 or selecting No in the Add Quotes To Strings parameter of this function panel modifies the behavior of the Ini_Text so that Ini_WriteToFile and Ini_WriteGeneric write string values without the surrounding double quotation marks. This can be useful when writing .ini files that are read by applications that do not expect double quotation marks around string values.

Note Note  This setting only affects string values that are written on a single line. If a string value is written such that it spans multiple lines, then this setting is ignored and each line of the multi-line string value will always be surrounded by double quotation marks. You can change the line spanning behavior of the Ini_Text by calling the Ini_SetMaxValueLineLength function.

Parameters

Input
Name Type Description
handle IniText A handle returned from Ini_New. It represents the list of in-memory tag/value pairs.
addQuotesToStrings int Specify a nonzero value or select Yes in the function panel to add surrounding double quotation marks when writing string values.

Specify 0 or select No in the function panel to write string values without double quotation marks.

Return Value

Name Type Description
previousSetting int Returns the previous value of this setting for the IniText.

Additional Information

Library: Reading/Writing .ini-Style Files

Include file: toolbox\inifile.h

LabWindows/CVI compatibility: LabWindows/CVI 2012 and later