Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » strings library
strings library [message #63254] Sun, 30 September 2007 18:27 Go to next message
Eclipse UserFriend
Originally posted by: not.provided.info

where to get strings library to run transformation? strings.asm or
strings.atl is missing in ATL bundle
without it I can't run my transformations, as I use strings
Re: strings library [message #63280 is a reply to message #63254] Sun, 30 September 2007 18:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: x.a.com

it seems it is already embedded into ATL, explicit declaration is not
needed anymore
Re: strings library [message #63303 is a reply to message #63280] Mon, 01 October 2007 11:39 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
x schreef:
> it seems it is already embedded into ATL, explicit declaration is not
> needed anymore
>

AFAIK, the internal strings.asm library is used by the ATL compiler. It
is not included by default, and not meant to be used by end users
either. That said, the ATL native String type supports more operations
than it used to. These are the native String operations (excluding +, <,
>, =, etc.):

Integer size()
String concat(String o)
String substring(Integer start, Integer end)
Integer toInteger()
Real toReal()
Boolean toBoolean()
Sequence toSequence()
String toCString()
String toUpper()
String toLower()
String trim()
Boolean startsWith(String o)
Boolean endsWith(String o)
Integer indexOf(String o)
Integer lastIndexOf(String o)
String regexReplaceAll(String a, String b) {
Sequence split(String a)
String replaceAll(String a, String b)
OclAny readFrom()
Boolean writeTo(String fileName)
Boolean writeToWithCharset(String fileName, String charset)
OclUndefined println()
String toString()
OclAny inject(String targetModelName, String kind, String params)

If you need other string operations, you should probably define them in
your own library. Example:

helper context String def: firstToUpper() : String =
self->substring(1, 1)->toUpper() + self->substring(2, self->size());

--
Dennis
Previous Topic:Iteratin on 0-n reference
Next Topic:[ATL] ClassCastException with java code and ant tasks
Goto Forum:
  


Current Time: Fri Apr 19 21:22:43 GMT 2024

Powered by FUDForum. Page generated in 0.03093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top