---
title: "NSPointFromString(_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nspointfromstring(_:)"
---

# NSPointFromString(_:)

Returns a point from a text-based representation.

## Declaration

```swift
func NSPointFromString(_ aString: String) -> NSPoint
```

## Parameters

- `aString`: A string of the form “{x, y}”.

## Return Value

Return Value If aString is of the form “{x, y}” an NSPoint structure that uses x and y as the x and y coordinates, in that order.

## Discussion

Discussion If aString only contains a single number, it is used as the x coordinate. If aString does not contain any numbers, returns an NSPoint object whose x and y coordinates are both 0.

## See Also

### Managing Points

- [NSEqualPoints(_:_:)](foundation/nsequalpoints(_:_:).md)
- [NSMakePoint(_:_:)](foundation/nsmakepoint(_:_:).md)
- [NSStringFromPoint(_:)](foundation/nsstringfrompoint(_:).md)
- [NSPointFromCGPoint(_:)](foundation/nspointfromcgpoint(_:).md)
- [NSPointToCGPoint(_:)](foundation/nspointtocgpoint(_:).md)
