FlexHEX Editor - Just the Right Tool to Edit Binaries

Introduction

Files and Drives

Inspecting Data

Editing Data

Navigation

Search and Replace

Tools

Complex Data Types

Loading and Mapping

Editing Structured Data

Structure Definition

Structures

Unions

Arrays

Strings

Enumerations

Bit Structures

Basic Types

Special Fields

Advanced Features


 

 

Strings

Basically, string is just an array, which elements are characters or wide (UNICODE) characters. The main difference is in the way the string is edited - string is treated as a single object, not as a set of independent values.

Like any array, a string may be either of a fixed or of a variable length.

struct PascalString {
  unsigned byte StrLength;
  char String[StrLength];
};

Zero Terminated Strings

In addition to fixed and variable size specifier, character arrays may have no size specifier at all.

struct CString {
  char szString[];
};

This syntax is allowed only to character and wide character arrays and means that the string is zero-terminated. The actual size of the string is calculated as the number of characters including the terminating zero character.

Tip You cannot declare a zero-terminated string type. Strings with omitted size specifier may occur only as a field declaration within a composite data object (structure or union).

 

 
Copyright © 2007 Inv Softworks LLC
All rights reserved
 
Home | Product | Download | Order | Support | Documentation | Company