Intelligent word wrapping
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 138
- Joined: Wed Jul 16, 2008 9:51 pm
- Location: Kolkata
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
If you are going to break into multiple columns, you must be knowing the max number of possible columns.
On that basis, you may be able to do the following
and continue till for all your columns.
I am sure this will be faster than dragging a basic transfer into your pallette.
Also check index with negative number, -1. I think it does reverse scan.
Do not have DS now to check.
On that basis, you may be able to do the following
Code: Select all
stgMaxColLength = 4000
stgCol1End =
If Count(inputCol[1, stgMaxColLength], " ") = 0
Then stgMaxColLength
Else Index(inputCol, " ",Count(inputCol[1, stgMaxColLength], " "))
stgCol2Begin = stgCol1End + 1
stgCol2End =
If Count(inputCol[stgCol2Begin, stgMaxColLength + stgCol2Begin - 1], " ") = 0
Then stgMaxColLength
Else Index(inputCol[stgCol2Begin,999999], " ",Count(inputCol[stgCol2Begin, stgMaxColLength + stgCol2Begin - 1], " "))
I am sure this will be faster than dragging a basic transfer into your pallette.
Also check index with negative number, -1. I think it does reverse scan.
Do not have DS now to check.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Yes, the maximum columns defined as per requirement is 20 (40 char each) only. However, we assume that the input field (800Char) will not be greater than 650 char in any case. Hence this would suffice.priyadarshikunal wrote:just out of curiosity, will 40 columns be enough to store 800 char long string with word wrapping?