TStr CookieExpand(TStr &Cookie, const TStr &Name) { TStr c = Cookie.CopyAfter(Name + "="); c = c.CopyBefore(";").CopyBefore(","); if( c.Length() != 32 ) { c = Cookie.CopyAfter(Name + "=").CopyAfter(Name + "="); c = c.CopyBefore(";").CopyBefore(","); } if( c.Length() != 32 ) { c = Cookie.CopyAfter(Name + "=").CopyAfter(Name + "=").CopyAfter(Name + "="); c = c.CopyBefore(";").CopyBefore(","); } if( c.Length() != 32 ) c.Clear(); return c; }