Skip to content

[RFC]: add @stdlib/assert/is-complex-string #1370

Open
@marsian83

Description

@marsian83

Description

This RFC proposes adding package @stdlib/assert/is-complex-string.

The package should be similar in structure to @stdlib/complex/reviver-float32.

The goal is to assert if an input string is of a complex number format string(a + ib) or (a+bi)
where, a and b are numbers

 function isComplexString( str ) => boolean

Eg : isComplexString( "32+12i" ) returns true
Eg : isComplexString( "32+i12" ) returns true
Eg : isComplexString( null ) returns true
Eg : isComplexString( "" ) returns false
Eg : isComplexString( "abcd+12i" ) returns false
Eg : isComplexString( Infinity ) returns false

Package: @stdlib/assert/is-complex-string Alias: isComplexString

Related Issues

Can help with issues #1332 and #1333

Questions

This is my first issue so I'd like to know if the way I have proposed the feature is correct

Other

No response

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedRFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions