Bob Sneidar wrote:
> put tWord after word 2 of me
...
> The point was that if there was no line 2 it would create one so that
> it had something to put after. Works with lines and items. Does not
> work with words, but as it was explained, though we use the term
> "delimited" when talking
The point was that if there was no line 2 it would create one so that it had
something to put after. Works with lines and items. Does not work with words,
but as it was explained, though we use the term "delimited" when talking about
words, it's a different animal.
Bob S
> On Sep 11, 2017,
Bob Sneidar wrote:
> put tWord after word 2 of me
>
> Shouldn't that create a second word?
No. It will append the string tWord after the chunk element specified
in the target expression, "word 2 of me".
It may be clearer to consider lines:
put "Something" after line 2 of tContainer
With
Because a word is defined as 'a number of characters together in a string
separated either or both sides by a white space'. So it doesn't actually
count the white spaces but the number of actual strings of characters
separated by them. The actual glossary term is not fully expressive by
saying "A
Think about it:
Items ate comma (a single character) delimited, so if a container
contains a single string (no commas) and you "put tString after item 3
of tContainer", LiveCode can logically create an "empty" item 2 and
empty item 3 using ",," and place (concatenate) tString on to the end of
Setting the itemdelimiter to space and using items instead of words would
certainly work around it, thanks for that tip.
But by way of discussion, when we talk about string manipulation in this
list/forum, and how words are "delimited" we actually use the word "delimiter"
to talk about the
This is exactly what I'd expect as 'item' uses a delimiter. If you had
'space' as the delimiter you could then use:
set the itemdel to space; put "test" into tString; put "test3" into item 3
of tString; put tString
result: test test3
(with 2 spaces between the two words)
now:
put the number of
> On 12 Sep 2017, at 8:10 am, Bob Sneidar via use-livecode
> wrote:
>
> put "test" into tString;put "test3" into word 3 of tString;put tString
> produces: testtest3
>
> Doesn't that seem like an anomaly to anyone?
Hmm… yes this should probably fail with an
You already know this, but you can also put tWord after tContainer (or
after text of me) - no chunk expression needed.
Phil Davis
On 9/11/17 3:05 PM, Bob Sneidar via use-livecode wrote:
Actually that was a typo. Put tWord after word 2 of me is what I meant.
Bob S
On Sep 11, 2017, at
Curiously then, you can have a string with 1 item, then put tWord into item 3
of tString, and it will happily create an empty item 2 so that there is an item
3 to put something into. ex.
put "test" into tString;put "test3" into item 3 of tString;put tString
produces: test,,test3
put "test"
Actually that was a typo. Put tWord after word 2 of me is what I meant.
Bob S
> On Sep 11, 2017, at 14:11 , Bob Sneidar via use-livecode
> wrote:
>
> put tWord after word 2 of me into me
___
use-livecode mailing
It doesn’t change your question, but you don’t need ‘into me’ at the end each
line
put "four" into word 1 of me
put space & "help" after word 1 of me
> On Sep 11, 2017, at 4:50 PM, Sean Cole (Pi) via use-livecode
> wrote:
>
> Put "two" after word 1 of "word"
Put "two" after word 1 of "word"
result: "wordtwo"
put "two" after word 2 of "word"
result: "wordtwo"
'after word' basically counts white space. eg, "word,word,word" is counted
as one word". "word word" with several spaces counts as
two words. "word " still counts as
seems like it should. In fact it should work with " into " also, but that
has the same behavior
On Mon, Sep 11, 2017 at 3:11 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:
> Okay so if a field only has 1 word, and I state
>
> put tWord after word 2 of me into me
>
>
14 matches
Mail list logo