Files
harbour-core/harbour/samples/cccppc/tkstr.prg
1999-11-09 01:37:27 +00:00

56 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* $Id$
*/
//*******************************************************************
// tkstr.prg: a TKSTR oszt ly implement ci¢ja.
// 1999, Csisz r Levente
//*******************************************************************
#include "ctoken.ch"
//*******************************************************************
#include "objgen.ch"
#define _TKSTR_PRG_
#define _IMPLEMENT_ONEW_
#include "tkstr.och"
//*******************************************************************
//*******************************************************************
implement oinit(id,str,file,line,pos,kezdo,zaro)
super:oinit(id,str,file,line,pos)
this:kezdo:=kezdo
this:zaro :=zaro
return this
//*******************************************************************
implement getStr()
local str,i
if (!this:id==TKID_STRING)
return super:getStr()
endif
// Incompatibility
// if (empty(this:zaro))
// return this:kezdo+this:str+this:kezdo
// else
// return this:kezdo+this:str+this:zaro
// endif
return stringifyStr(this:str)
//*******************************************************************
cimplement copyFromToken(t,id,str,kezdo,zaro)
return class:onew(id,;
if(str==nil,TOKEN.t:str,str),;
TOKEN.t:file,TOKEN.t:line,TOKEN.t:pos,kezdo,zaro)
//*******************************************************************