Gets the cookie form the given name.

@param name
the name
@return the cookie
331692
public static Cookie getCookie(final String name)
	{
		return ((WebRequest)RequestCycle.get().getRequest()).getCookie(name);
	}
1145579
public function getCookieNamed($name)
    {
        $cookies = $this->getCookies();
        foreach ($cookies as $cookie) {
            if ($cookie['name'] === $name) {
                return $cookie;
            }
        }

        return null;
    }
1093515
public String cookie(String name) {
        Cookie[] cookies = servletRequest.getCookies();
        if (cookies != null) {
            for (Cookie cookie : cookies) {
                if (cookie.getName().equals(name)) {
                    return cookie.getValue();
                }
            }
        }
        return null;
    }
30635
protected Cookie getCookieFromRequest(String name, HttpServletRequest request) {
        final Cookie[] cookies = request.getCookies();
        if (cookies == null) { // getCookies() returns null if there aren't any
            return null;
        }

        for (final Cookie cookie : cookies) {
            if (name.equals(cookie.getName())) {
                return cookie;
            }
        }

        return null;
    }
1018204
@Override
  public final String getCookieValue(final String pName) {
    if (this.httpReq.getCookies() == null) {
      return null;
    }
    for (Cookie co : this.httpReq.getCookies()) {
      if (co.getName().equals(pName)) {
        return co.getValue();
      }
    }
    return null;
  }
486498
public HttpResponse withCookie(String name, String value) {
        this.cookies.withEntry(name, value);
        return this;
    }
757249
public static Cookie getCookie(HttpServletRequest request, String name) {
    Cookie[] cookies = request.getCookies();
    Cookie returnCookie = null;

    if (cookies == null) { return returnCookie; }
    for (int i = 0; i < cookies.length; i++) {
      Cookie thisCookie = cookies[i];
      if (thisCookie.getName().equals(name) && !thisCookie.getValue().equals("")) {
        returnCookie = thisCookie;
        break;
      }
    }
    return returnCookie;
  }
455662
function(name) {
		var cookie = document.cookie, e, p = name + "=", b;

		if ( !cookie )
			return;

		b = cookie.indexOf("; " + p);

		if ( b == -1 ) {
			b = cookie.indexOf(p);

			if ( b != 0 )
				return null;

		} else {
			b += 2;
		}

		e = cookie.indexOf(";", b);

		if ( e == -1 )
			e = cookie.length;

		return decodeURIComponent( cookie.substring(b + p.length, e) );
	}
5383
public function get($name)
    {
        $cookies = $this->getAll();

        foreach ($cookies as $cookie) {
            if ($cookie->getName() == $name) {
                return $cookie;
            }
        }

        return null;
    }
337830
def cookie_get(self, name):
		
		if not hasattr(self, 'cookies'):
			return None
		if self.cookies.get(name):
			return self.cookies.get(name).value
		return None
810736
public final static Cookie getCookie(HttpServletRequest httpServletRequest, String name) {
		final Map<String, Cookie> cookieMap = readCookieMap(httpServletRequest);
		return cookieMap == null ? null : cookieMap.get(name);
	}
950932
public function get($name)
    {
        if (!is_string($name)) {
            throw new Cookie\Exception('The cookie name must be string');
        }

        if (isset($this->cookies[$name])) {
            $this->cookies[$name]->useEncryption($this->isUsingEncryption());

            return $this->cookies[$name];
        }

        return null;
    }
155638
public function get($name = '')
    {
        $result = '';
        if (isset($_COOKIE[$name])) {
            $result = $_COOKIE[$name];
        }

        return $result;
    }
817323
public static Cookie getCookie(String name, HttpServletRequest request) {
        return getCookie(name, request.getCookies());
    }
751585
public function cookie($name) {
        if ( in_array($name, $this->cookies) ) {
            return filter_input(INPUT_COOKIE, $name, FILTER_SANITIZE_STRING);
        }
        return NULL;
    }
818739
@Override
    public Optional<WSCookie> getCookie(String name) {
        for (Cookie ahcCookie : ahcResponse.getCookies()) {
            // safe -- cookie.getName() will never return null
            if (ahcCookie.name().equals(name)) {
                return Optional.of(asCookie(ahcCookie));
            }
        }
        return Optional.empty();
    }
333942
public Cookie getCookieValueByName(final HttpServletRequest request,
            final String name) {
        if (request.getCookies() == null) {
            return null;
        }
        for (int i = 0; i < request.getCookies().length; i++) {
            if (request.getCookies()[i].getName().equals(name)) {
                return request.getCookies()[i];
            }
        }
        return null;
    }