Snapshot release 11-Dec-2023

There is a new v1.45.1 snapshot release. You can find out more and download the release for Windows or Mac at:

Please try it and let us know if you have any issues.


Wow! This is a really great and useful update. Renaming the columns, correlation, and the copy and paste options are really appreciated.

1 Like


1 Like


Using IndexOf in the Calculate

If the value that you are looking for is an empty string then it still gives zero which is wrong it should return -1 or am I missing something?

Searching content value of column 4 in content value of column 1.

A what position does an empty string exist in a non-empty string is up there with β€œDoes the set that contains all non-empty sets contain itsself?” and " What is the sound of one hand clapping?". ;0)

In Excel:

Find( β€œβ€, β€œxyz” ) returns 1 (1-based index)
Find( β€œxyz”, β€œβ€ ) returns an empty cell
Find( β€œβ€, β€œβ€ ) returns an empty cell

In Qt/C++:

QString( β€œxyz” ).indexOf( β€œβ€ ) returns 0 (0-based index)
QString( β€œβ€ ).indexOf( β€œxyz” ) returns -1
QString( β€œβ€ ).indexOf( β€œβ€ ) returns 0 (0-based index)

In Javascript:

β€œxyz”.indexOf( β€œβ€ ) returns 0 (0-based index)
β€œβ€.indexOf( β€œxyz” ) returns -1 (0-based index)
β€œβ€.indexOf( β€œβ€ ) returns 0 (0-based index)

So all 3 implementations agree that a non-empty string contains an empty string at the first position.

They also agree that an empty string does not contain a non-empty string (non-controversial).

But they differ on the philosophical question of whether an empty string contains an empty string.

The Filter transform considers that an empty string contains an empty string, so I am going to go with that.

So I think the current implemntation will stay, except that I will probably change from 0-based to 1-based, as it is more intuitive for non-programmers.


Learned something new, that empty string still gets the position.
From Excle. I used (Find(c2,a2)-1) so that index value is zero based.

str 2 3 i1 i2
467…114… 467 114 0 5
…*… * 3 0
…35…633. 35 633 2 6
…#… # 6 0
617*… 617 * 0 3
…+.58. + 58 5 7
…592… 592 2 0
…755. 755 6 0
…$.*… $ * 3 5
.664.598… 664 598 1 5

So that mean, I should check first the string I am trying to search is not null and then use it.

I think so. I will think about it a bit more.

I did some tests on the C++ lastIndexOf() method and:

QString( β€œxyz” ).lastIndexOf( β€œβ€ ) returns 2 (0-based index)
QString( β€œβ€ ).lastIndexOf( β€œxyz” ) returns -1
QString( β€œβ€ ).lastIndexOf( β€œβ€ ) returns -1

It seems strange that QString( β€œβ€ ).indexOf( β€œβ€ ) and QString( β€œβ€ ).lastIndexOf( β€œβ€ ) have different results! Hmmm.

We can carry on this discussion at: