Skip to content

Conversation

@lilyball
Copy link
Contributor

@lilyball lilyball commented Dec 6, 2015

It is occasionally useful to be able to produce a substring of a StaticString
that can be passed to APIs expecting a StaticString. For example, extracting
the filename from __FILE__. But there is no way to do this today, as
StaticString does not provide any means by which to create a new instance
beyond the trivial nullary init() initializer (which creates an empty
string).

@lilyball
Copy link
Contributor Author

lilyball commented Dec 6, 2015

There's already an implementation of this as swiftlang/swift#277

DougGregor added a commit that referenced this pull request Dec 12, 2015
Proposal to add StaticString.UnicodeScalarView
@DougGregor DougGregor merged commit fe9f194 into swiftlang:master Dec 12, 2015
@lilyball lilyball deleted the staticstring-unicodescalarview branch December 12, 2015 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants