You are here: StringsStringLengthCalculator

StringLengthCalculator

Calculates the length of strings and the number of bytes in a blob.

Parameters

Usage Notes

Note that in non-ASCII character sets, the length is the number of actual characters (some or all of which could be multi-byte) in the string, which may not match the number of bytes used to store the string.

Example

To calculate the number of bytes in a blob:

  1. Add a raster format reader (for example, TIFF).
  2. Connect a RasterExtractor followed by a StringLengthCalculator.
  3. In the StringLengthCalculator parameters, select _rasterBlob as the Source Attribute.
  4. Connect an Inspector transformer.
  5. Run the Workspace.

Locate the _length attribute name in the Information Window:

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Transformer Categories

Strings

Search FME Knowledge Center

Search for samples and information about this transformer on the FME Knowledge Center.