The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tok problem. What is wrong with this string?
#1
Question 
I am implementing a simple text case correction macro, and encountered strange/unexpected behavior:
Code:
Copy      Help
str text="UPDATE: THERE ARE THREE LEVELS OF HEAVEN. I DID NOT KNOW THIS WHEN TAKING THESE JOURNEYS. “A TALK WITH IMMORTALS” IS CLEARLY LEVEL TWO. “JOURNEY TO MY FATHER” I BELIEVE WAS LEVEL ONE. THE OTHERS, USE YOUR OWN JUDGEMENT."
ARRAY(str) Tokens Delims
tok(text Tokens -1 "" 0 Delims)
out Delims
this outputs:
Code:
Copy      Help

 
 
 
 
 

 
 
 
 
 
 
 
 

 
 
 
 
 
 
 

 
 
 
 
 
 
 
 ONE. THE OTHERS, USE YOUR OWN JUDGEMENT.

 

 
 
 
.
why " ONE. THE OTHERS, USE YOUR OWN JUDGEMENT." is a delimiter?

The whole string is a random excerpt from a book. It did not happen with other strings.

Quick Macros 2.4.8.0


Messages In This Thread
tok problem. What is wrong with this string? - by Roman Mishin - 03-28-2019, 11:27 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)