jasonwood Posted February 9, 2011 Posted February 9, 2011 I found Andrew LaCates' ExplodedKey function in the forums, but I want to adapt it slightly, and I'm seeking help with that as I don't quite know where to start... Basically I want "Hello world" to result in: H He Hel Hell Hello W Wo Wor Worl World instead of H He Hel Hell Hello Hello Hello W Hello Wo Hello Wor Hello World //ExplodedKey(text) //By Andrew LaCates If( Length(text)>1; ExplodedKey(Left(text;Length(text)-1)) & "¶" & text; text )
bruceR Posted February 9, 2011 Posted February 9, 2011 Let( wc = WordCount( text); Case( wc > 1; List( ExplodedKey( LeftWords( text;1)) ; ExplodedKey( MiddleWords( text;2; wc))); Length(text)>0; List( ExplodedKey(Left(text;Length(text)-1)) ; text) ) ) 1
bruceR Posted February 9, 2011 Posted February 9, 2011 Note that the original can be simplified as: case( Length(text); List( ExplodedKey(Left(text;Length(text)-1)) ; text) )
Recommended Posts
This topic is 5104 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now