Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » count words or spaces in a string
count words or spaces in a string [message #560141] Tue, 21 September 2010 10:36
pkojo is currently offline pkojoFriend
Messages: 27
Registered: October 2009
Junior Member

I am interested to write a query to check how many words are used for the name of any classifier in OCL ( eclipse interpreter console).
to make it simple, count number of words used for a class name. took complete name as a one string.
To look for each character in the string it looks that substring function might work, for example third element in a string is a space. But substring took upper and lower values as an integer value. I want to make this a general query becuase I do not know how many words are used as a class name or after how many characters the next word starts.

Set{' '}->includes(,3))

is there any way to define this as general query.

Thanks in advance,

Previous Topic:[OCLinEcore] definition of operation works in OCL console, but not in other modules like Acceleo
Next Topic:definitions in OCL?
Goto Forum:

Current Time: Mon May 21 17:10:41 GMT 2018

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

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

Back to the top