D 2017-05-06T07:00:01.150
J icomment This\sdeserves\ssome\scommentary\sin\sthe\scode:\r\n\r\n>\sYou\shave\s(a)\r\n>\s>\spnext\s=\spattern\s-\s1;\r\n>\s>\ssnext\s=\sstr;\r\n\r\n>\swhere\sRuss\shas\r\n>\s>\snextPx\s=\spx\r\n>\s>\snextNx\s=\snx\s+\s1\r\n\r\npnext\s=\spattern\s-\s1\sbecause\sthe\swhile\sloop\simmmediately\safter\scase\s'*'\sincrements\spattern\sto\sthe\scharacter\safter\sthe\sfinal\s*.\r\n\r\nsnext\sI\smoved\sthe\sincrement\sto\sthe\sbacktrack\spoint\s(matchFail)\sto\ssave\scounting\sunichars\sand\skeep\sthe\scheck\sfor\send-of-string\sout\sof\sthe\smain\slogic\sflow.\r\n\r\n\r\nI\swould\sreally\slike\sto\sfactor\ssome\sof\sthe\srepetition\swithin\sthe\sfunction\s(all\sthe\sUCHAR\sbits),\spossibly\smove\s[]-handling\sinto\sa\sstatic\sfunction\sto\skeep\sthe\smain\sloop\sclearer\s..\sand\sif\swe\scould\sget\srid\sof\shaving\salmost\sidentical\scode\sin\sByteArrayMatch,\sUniCharMatch\sand\sUniCharCaseMatch\sthat\swould\sbe\sa\sbig\swin\simo.\r\n\r\nThanks\sfor\sthe\sreview/feedback!
J login aspect
J mimetype text/plain
K a4a7f2abd376b2806073d2865f07b7d910b04574
U aspect
Z 38b481e5b1e96b77f68bd40826569743