---
title: "JSStringIsEqualToUTF8CString(_:_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jsstringisequaltoutf8cstring(_:_:)"
---

# JSStringIsEqualToUTF8CString(_:_:)

Tests whether a JavaScript string matches a null-terminated UTF-8 string.

## Declaration

```swift
func JSStringIsEqualToUTF8CString(_ a: JSStringRef!, _ b: UnsafePointer<CChar>!) -> Bool
```

## Parameters

- `a`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSStringRef to test.
- `b`: The null-terminated UTF-8 string to test.

## Return Value

Return Value true if the two strings match; otherwise, false.

## See Also

### Comparing JavaScript Strings

- [JSStringIsEqual(_:_:)](javascriptcore/jsstringisequal(_:_:).md)
