NAME

OTC_Record - Class to perform splitting of strings.

SYNOPSIS


#include <OTC/text/record.hh>

class OTC_Record
{
  public:
    static os_typespec* get_os_typespec();
    OTC_Record(OTC_String const& theString);
    OTC_Record(OTC_String const& theString, char theFS);
    OTC_Record(OTC_String const& theString, OTC_String const& theFS);
    OTC_Record(OTC_Record const& theRecord);
    OTC_Record& operator=(OTC_Record const& theRecord);
    inline u_int numFields() const;
    OTC_String const& field(u_int theIndex) const;
    inline OTC_String const& operator[](u_int theIndex) const;
    inline OTC_Iterator<OTC_String> fields(
      OTC_Direction theDirection=OTCLIB_FORWARD
    ) const;
};

CLASS TYPE

Concrete

DESCRIPTION

The original string is accessable as field 0. The individual fields once the string has been split are accessable from field 1 upwards.

INITIALISATION

OTC_Record(OTC_String const& theString);
OTC_Record(OTC_String const& theString, char theFS);
OTC_Record(OTC_String const& theString, OTC_String const& theFS);
OTC_Record(OTC_Record const& theRecord);
OTC_Record& operator=(OTC_Record const& theRecord);

QUERY

inline u_int numFields() const;
OTC_String const& field(u_int theIndex) const;
inline OTC_String const& operator[](u_int theIndex) const;
inline OTC_Iterator<OTC_String> fields(
  OTC_Direction theDirection=OTCLIB_FORWARD
) const;

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1991 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED